Theorems / novel_fun_02
Authored
Functions · easy
theorem lg_target {α β : Type*} (f : α → β) (g : β → α) (h : ∀ x, g (f x) = x) : Function.Injective f := by- Source
- Written for LeanGraph, reference proof certified
- Premises used by the reference proof
- 0
Traces
Each configuration's full record: what was retrieved, what the model wrote, what Lean said back.
Verified0 model calls · 16 Lean checks · $0.00000
Attempts
- attempt 1Wrong tactic
Proof rfl
What Lean printed (this is all the model sees on repair) 4:2: error: Tactic `rfl` failed: The left-hand side β is not definitionally equal to the right-hand side f α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ Function.Injective f
- attempt 2Other
Proof decide
What Lean printed (this is all the model sees on repair) 4:2: error: Expected type must not contain free variables Function.Injective f Hint: Use the `+revert` option to automatically clean up and revert free variables
- attempt 3Valid but mathematically wrong
Proof norm_num
What Lean printed (this is all the model sees on repair) 3:105: error: unsolved goals α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ Function.Injective f
- attempt 4Wrong tactic
Proof simp
What Lean printed (this is all the model sees on repair) 4:2: error: `simp` made no progress
- attempt 5Wrong tactic
Proof ring
What Lean printed (this is all the model sees on repair) 4:2: error: `ring_nf` made no progress on the goal
- attempt 6Wrong tactic
Proof linarith
What Lean printed (this is all the model sees on repair) 4:2: error: linarith failed to find a contradiction α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ False failed
- attempt 7Wrong tactic
Proof nlinarith
What Lean printed (this is all the model sees on repair) 4:2: error: linarith failed to find a contradiction α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ False failed
- attempt 8Wrong tactic
Proof positivity
What Lean printed (this is all the model sees on repair) 4:2: error: not a positivity goal
- attempt 9Wrong tactic
Proof omega
What Lean printed (this is all the model sees on repair) 4:2: error: omega could not prove the goal: No usable constraints found. You may need to unfold definitions so `omega` can see linear arithmetic facts about `Nat` and `Int`, which may also involve multiplication, division, and modular remainder by constants.
- attempt 10Wrong tactic
Proof field_simp
What Lean printed (this is all the model sees on repair) 4:2: error: `field_simp` made no progress on the goal
- attempt 11Wrong tactic
Proof tauto
What Lean printed (this is all the model sees on repair) 4:2: error: Tactic `tauto` failed α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ Function.Injective f
- attempt 12Wrong tactic
Proof simp_all
What Lean printed (this is all the model sees on repair) 4:2: error: simp_all made no progress
- attempt 13Wrong tactic
Proof aesop
What Lean printed (this is all the model sees on repair) 4:2: error: Tactic `aesop` failed, made no progress Initial goal: α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ Function.Injective f
- attempt 14Other
Proof grind
What Lean printed (this is all the model sees on repair) 4:2: error: `grind` failed case grind α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x h_1 : ¬Function.Injective f ⊢ False [grind] Goal diagnostics [facts] Asserted facts [prop] ∀ (x : α), g (f x) = x [prop] ¬Function.Injective f [eqc] True propositions [prop] ∀ (x : α), g (f x) = x [eqc] False propositions [prop] Function.Injective f [ematch] E-matching patterns [thm] h: [g (f #0)] [thm] h: [f #0] - attempt 15Wrong tactic
Proof norm_num <;> linarith
What Lean printed (this is all the model sees on repair) 4:15: error: linarith failed to find a contradiction α : Type u_1 β : Type u_2 f : α → β g : β → α h : ∀ (x : α), g (f x) = x ⊢ False failed
- attempt 16Verified
Proof exact?
Verified proof
theorem lg_target {α β : Type*} (f : α → β) (g : β → α) (h : ∀ x, g (f x) = x) : Function.Injective f := by
exact?Axioms used: none
Reference proof
The proof we wrote and certified before any model ran.
intro a b hab rw [← h a, ← h b, hab]