Files
lean4/tests/elab/rw_inst_implicit_args.lean
Garmelon 08eb78a5b2 chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

16 lines
702 B
Lean4

/-
This test ensures `rw` will not try to synthesize instance implicit arguments when they can
be inferred by unification. Note that in some cases the inferred instance may not even be
definitionally equal to the inferred one, and would prevent the rewrite from being applied.
-/
theorem dec_and (p q : Prop) [Decidable (p q)] [Decidable p] [Decidable q] : decide (p q) = (p && q) := by
by_cases p <;> by_cases q <;> simp [*]
theorem dec_not (p : Prop) [Decidable (¬p)] [Decidable p] : decide (¬p) = !p := by
by_cases p <;> simp [*]
example [Decidable u] [Decidable v] : decide (u (v False)) = (decide u && !decide v) := by
simp only [imp_false]
rw [dec_and]
rw [dec_not]