lean4-htt/tests/lean/simpZetaFalse.lean.expected.out
Leonardo de Moura cf36ac986d
perf: optimize simp congruence proofs (#11892)
This PR optimizes the construction on congruence proofs in `simp`.
It uses some of the ideas used in `Sym.simp`.
2026-01-04 19:37:21 +00:00

77 lines
2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

x : Nat
h : f (f x) = x
⊢ (have y := x * x;
if True then 1 else y + 1) =
1
theorem ex0 : ∀ (x : Nat),
f (f x) = x →
(have y := 0 + x * x;
if f (f x) = x then 1 else y + 1) =
1 :=
fun x h =>
Eq.mpr
(id
(congrFun'
(congrArg Eq
(id
(id
(have_congr' (Nat.zero_add (x * x)) fun y =>
ite_congr (Eq.trans (congrFun' (congrArg Eq h) x) (eq_self x)) (fun a => Eq.refl 1) fun a =>
Eq.refl (y + 1)))))
1))
(of_eq_true (Eq.trans (congrFun' (congrArg Eq (ite_cond_eq_true 1 (x * x + 1) (Eq.refl True))) 1) (eq_self 1)))
x : Nat
h : f (f x) = x
⊢ (have y := x * x;
if True then 1 else y + 1) =
1
theorem ex1 : ∀ (x : Nat),
f (f x) = x →
(have y := x * x;
if f (f x) = x then 1 else y + 1) =
1 :=
fun x h =>
Eq.mpr
(id
(congrFun'
(congrArg Eq
(id
(id
(have_body_congr' (x * x) fun y =>
ite_congr (Eq.trans (congrFun' (congrArg Eq h) x) (eq_self x)) (fun a => Eq.refl 1) fun a =>
Eq.refl (y + 1)))))
1))
(of_eq_true (Eq.trans (congrFun' (congrArg Eq (ite_cond_eq_true 1 (x * x + 1) (Eq.refl True))) 1) (eq_self 1)))
x z : Nat
h : f (f x) = x
h' : z = x
⊢ (have y := x;
y) =
z
theorem ex2 : ∀ (x z : Nat),
f (f x) = x →
z = x →
(have y := f (f x);
y) =
z :=
fun x z h h' =>
Eq.mpr (id (congrFun' (congrArg Eq (id (id (have_val_congr' h)))) z))
(of_eq_true (Eq.trans (congrArg (Eq x) h') (eq_self x)))
x z : Nat
⊢ (let α := Nat;
fun x => 0 + x) =
id
p : Prop
h : p
⊢ (have n := 10;
fun x => True) =
fun z => p
theorem ex4 : ∀ (p : Prop),
p →
(have n := 10;
fun x => x = x) =
fun z => p :=
fun p h =>
Eq.mpr
(id (congrFun' (congrArg Eq (id (id (have_body_congr_dep' 10 fun n => funext fun x => eq_self x)))) fun z => p))
(of_eq_true (Eq.trans (congrArg (Eq fun x => True) (funext fun z => eq_true h)) (eq_self fun x => True)))