lean4-htt/tests/lean/simprocEval3.lean
Markus Himmel 47548aa171
chore: rename UIntX.ofNatCore, UIntX.ofNat' -> UIntX.ofNatLT (#7071)
This PR unifies the existing functions `UIntX.ofNatCore` and
`UIntX.ofNat'` under a new name, `UIntX.ofNatLT`.
2025-02-14 06:58:15 +00:00

84 lines
1.3 KiB
Text

def foo (_ : Nat) := (10 : UInt32)
example (h : x = 8) : x = (8 : UInt32).toNat := by
simp
trace_state
assumption
example (h : x = 8) : x = UInt32.ofNatLT 8 (by decide) := by
simp
trace_state
assumption
example : foo x = 8 + 2 := by
simp
trace_state
rw [foo]
example : foo x = 5 * 2 := by
simp
trace_state
rw [foo]
example : foo x = 12 - 2 := by
simp
trace_state
rw [foo]
example : foo x = 20 / 2 := by
simp
trace_state
rw [foo]
example : foo x = 110 % 100 := by
simp
trace_state
rw [foo]
example : foo x = (3+2)*2 := by
simp
trace_state
rw [foo]
def boo (_ : Nat) := True
example : boo x ↔ (2 : UInt32) < 3 := by
simp
trace_state
trivial
example : boo x ↔ (3 : UInt32) > 2 := by
simp
trace_state
trivial
example : boo x ↔ (2 : UInt32) ≤ 3 := by
simp
trace_state
trivial
example : boo x ↔ (3 : UInt32) ≥ 2 := by
simp
trace_state
trivial
example (h : x = false) : x = ((3 : UInt32) == 4) := by
simp
trace_state
assumption
example (h : x = true) : x = ((3 : UInt32) != 4) := by
simp
trace_state
assumption
example (h : ¬x) : x = ((3 : UInt32) = 4) := by
simp
trace_state
assumption
example (h : x) : x = ((3 : UInt32) ≠ 4) := by
simp
trace_state
assumption