lean4-htt/tests/lean/run/grind_fun_singleton.lean
Leonardo de Moura 2d3501be61
feat: constant functions in grind (#9735)
This PR extends the propagation rule implemented in #9699 to constant
functions.
2025-08-05 16:19:51 +00:00

40 lines
1.1 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.

example (h : (fun (_ : Unit) => x = 1) = (fun _ => True)) : x = 1 := by
grind
example
(h₁ : f = fun (_ : Unit) => x = 1)
(h₂ : g = fun (_ : Unit) => True)
(h₃ : f = g)
: x = 1 := by
grind
example
(h₁ : f = fun (_ : Unit × Unit) => x = 1)
(h₂ : g = fun (_ : Unit × Unit) => True)
(h₃ : f = g)
: x = 1 := by
grind
example (h : (fun (_ : True → Unit) (_ : Unit) => x + 1) = (fun _ _ => 1 + y)) : x = y := by
grind
example (h : (fun (_ : Unit) => x + 1) = (fun _ => 1 + y)) : x = y := by
grind
example (h : (fun (_ : Unit → Unit) => x + 1) = (fun _ => 1 + y)) : x = y := by
grind
example
(x y z : Nat)
(h₁ : f = fun (_ : Unit × Unit) => x + y)
(h₂ : g = fun (_ : Unit × Unit) => w)
(h₃ : f = g)
(h₄ : f = fun (_ : Unit × Unit) => y + z)
: x = z ∧ x + y = w := by
grind
example [Inhabited α] : ((fun (_ : α) => x = a + 1) = fun (_ : α) => True) → x = a + 1 := by
grind
example : c = 5 → ((fun (_ : Nat × Nat) => { down := a + c = b + 5 : ULift Prop }) = fun (_ : Nat × Nat) => { down := c < 10 : ULift Prop }) → a = b := by
grind