File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ theorem natCast_mod (a b : Nat) : (NatCast.natCast (a % b) : Int) = (NatCast.nat
8282theorem natCast_add (a b : Nat) : (NatCast.natCast (a + b : Nat) : Int) = (NatCast.natCast a : Int) + (NatCast.natCast b : Int) := rfl
8383theorem natCast_mul (a b : Nat) : (NatCast.natCast (a * b : Nat) : Int) = (NatCast.natCast a : Int) * (NatCast.natCast b : Int) := rfl
8484theorem natCast_pow (a b : Nat) : (NatCast.natCast (a ^ b : Nat) : Int) = (NatCast.natCast a : Int) ^ b := by simp
85+ theorem natCast_id (a : Nat) : NatCast.natCast a = a := rfl
8586
8687theorem Nat.pow_one (a : Nat) : a ^ 1 = a := by
8788 simp
@@ -184,7 +185,7 @@ init_grind_norm
184185 Int.ediv_zero Int.emod_zero
185186 Int.ediv_one Int.emod_one
186187 Int.negSucc_eq
187- natCast_div natCast_mod
188+ natCast_div natCast_mod natCast_id
188189 natCast_add natCast_mul natCast_pow
189190 Int.one_pow
190191 Int.pow_zero Int.pow_one
Original file line number Diff line number Diff line change @@ -5,3 +5,9 @@ example (x : Nat) : NatCast.natCast x ≥ 0 := by grind
55example (x : Nat) : x ≥ (-1 : Int) := by grind
66example (x : Nat) : Int.ofNat x ≥ (-1 : Int) := by grind
77example (x : Nat) : NatCast.natCast x ≥ -1 := by grind
8+
9+ example (n : Nat) : Nat.cast n = n := by
10+ grind
11+
12+ example (n m a : Nat) : n = m → Nat.cast n - a = m - a := by
13+ grind
You can’t perform that action at this time.
0 commit comments