Compare commits

...

3 Commits

Author SHA1 Message Date
Leonardo de Moura
67d4f9a1ef chore: fix test 2026-02-06 00:26:02 -08:00
Leonardo de Moura
d3e4bc7966 chore: fix tests 2026-02-06 00:24:27 -08:00
Leonardo de Moura
60bda1cbad feat: some unification hints
This PR adds a few unification hints that we will need after
`backward.isDefEq.respectTransparency` is `true` by default.
2026-02-06 00:16:53 -08:00
6 changed files with 12 additions and 15 deletions

View File

@@ -14,3 +14,12 @@ public section
`TransparencyMode.reducible` -/
unif_hint (p : Prop) where
|- Not p =?= p False
unif_hint (n : Nat) where
n - 0 =?= n
unif_hint (n : Nat) where
n + 0 =?= n
unif_hint (n : Nat) where
n * 0 =?= 0

View File

@@ -7,12 +7,12 @@ macro "begin " ts:tactic,*,? i:"end" : term => do
theorem ex1 (x : Nat) : x + 0 = 0 + x :=
begin
rw [Nat.zero_add],
rw [Nat.add_zero],
rw [Nat.zero_add],
end
/- ANCHOR_END: doc -/
theorem ex2 (x : Nat) : x + 0 = 0 + x :=
begin
rw [Nat.zero_add]
rw [Nat.add_zero]
end -- error should be shown here

View File

@@ -1,3 +1,3 @@
beginEndAsMacro.lean:18:2-18:5: error: unsolved goals
x : Nat
⊢ x + 0 = x
⊢ x = 0 + x

View File

@@ -29,7 +29,6 @@ theorem MyInt.natCast_eq (n : Nat) : (n : MyInt) = formalDiff n 0 := rfl
theorem MyInt.natCast_inj (n m : Nat) :
(n : MyInt) = (m : MyInt) n = m := by
rw [natCast_eq, natCast_eq, eq]
grind
example (n m : Nat) : (n : MyInt) = (m : MyInt) n = m := by
grind [MyInt.natCast_eq, MyInt.eq]

View File

@@ -1,8 +0,0 @@
open Lean.Parser.Tactic in
macro "rw0" s:rwRuleSeq : tactic =>
`(tactic| rw (config := { offsetCnstrs := false }) $s:rwRuleSeq)
example (m n : Nat) : Nat.ble (n+1) (n+0) = false := by
rw0 [Nat.add_zero]
trace_state
admit

View File

@@ -1,3 +0,0 @@
m n : Nat
⊢ (n + 1).ble n = false
rwWithoutOffsetCnstrs.lean:5:0-5:7: warning: declaration uses `sorry`