ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: ite_sub_ite
File: Mathlib/Algebra/Ring/Defs.lean

Proof steps:
state_before: α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : Sub α
P : Prop
inst✝ : Decidable P
a b c d : α
⊢ ((if P then a else b) - if P then c else d) = if P then a - c else b - d
state_after: case isTrue
α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : Sub α
P : Prop
inst✝ : Decidable P
a b c d : α
h✝ : P
⊢ a - c = a - c

case isFalse
α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : Sub α
P : Prop
inst✝ : Decidable P
a b c d : α
h✝ : ¬P
⊢ b - d = b - d
tactic: split
state_before: case isTrue
α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : Sub α
P : Prop
inst✝ : Decidable P
a b c d : α
h✝ : P
⊢ a - c = a - c

case isFalse
α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : Sub α
P : Prop
inst✝ : Decidable P
a b c d : α
h✝ : ¬P
⊢ b - d = b - d
state_after: no goals
tactic: repeat rfl
Theorem: preNormEDS_odd
File: Mathlib/NumberTheory/EllipticDivisibilitySequence.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m : ℕ
⊢ preNormEDS b c d (2 * (↑m + 2) + 1) =
    (preNormEDS b c d (↑m + 4) * preNormEDS b c d (↑m + 2) ^ 3 * if Even m then b else 1) -
      preNormEDS b c d (↑m + 1) * preNormEDS b c d (↑m + 3) ^ 3 * if Even m then 1 else b
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m : ℕ
⊢ preNormEDS' b c d (2 * (m + 2) + 1) =
    (preNormEDS' b c d (m + 4) * preNormEDS' b c d (m + 2) ^ 3 * if Even m then b else 1) -
      preNormEDS' b c d (m + 1) * preNormEDS' b c d (m + 3) ^ 3 * if Even m then 1 else b
tactic: repeat erw [preNormEDS_ofNat]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m : ℕ
⊢ preNormEDS' b c d (2 * (m + 2) + 1) =
    (preNormEDS' b c d (m + 4) * preNormEDS' b c d (m + 2) ^ 3 * if Even m then b else 1) -
      preNormEDS' b c d (m + 1) * preNormEDS' b c d (m + 3) ^ 3 * if Even m then 1 else b
state_after: no goals
tactic: exact preNormEDS'_odd ..
Theorem: List.subperm_cons
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

Proof steps:
state_before: α : Type u_1
a : α
l₁ l₂ : List α
⊢ a :: l₁ <+~ a :: l₂ ↔ l₁ <+~ l₂
state_after: α : Type u_1
a : α
l₁ l₂ : List α
x✝ : a :: l₁ <+~ a :: l₂
l : List α
p : l ~ a :: l₁
s : l <+ a :: l₂
⊢ l₁ <+~ l₂
tactic: refine ⟨fun ⟨l, p, s⟩ => ?_, fun ⟨l, p, s⟩ => ⟨a :: l, p.cons a, s.cons₂ _⟩⟩
state_before: α : Type u_1
a : α
l₁ l₂ : List α
x✝ : a :: l₁ <+~ a :: l₂
l : List α
p : l ~ a :: l₁
s : l <+ a :: l₂
⊢ l₁ <+~ l₂
state_after: no goals
tactic: match s with
  | .cons _ s' => exact (p.subperm_left.2 <| (sublist_cons _ _).subperm).trans s'.subperm
  | .cons₂ _ s' => exact ⟨_, p.cons_inv, s'⟩
Theorem: Multiset.Pi.cons_map
File: Mathlib/Data/Multiset/Pi.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
a : α
b : δ a
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
⊢ (cons m a (φ b) fun a' ha' => φ (f a' ha')) = fun a' ha' => φ (cons m a b f a' ha')
state_after: case h.h
α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
a : α
b : δ a
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
a' : α
ha' : a' ∈ a ::ₘ m
⊢ cons m a (φ b) (fun a' ha' => φ (f a' ha')) a' ha' = φ (cons m a b f a' ha')
tactic: ext a' ha'
state_before: case h.h
α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
a : α
b : δ a
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
a' : α
ha' : a' ∈ a ::ₘ m
⊢ cons m a (φ b) (fun a' ha' => φ (f a' ha')) a' ha' = φ (cons m a b f a' ha')
state_after: case h.h
α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
a : α
b : δ a
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
a' : α
ha' : a' ∈ a ::ₘ m
⊢ (fun h => ⋯ ▸ φ b) = fun h => φ (⋯ ▸ b)
tactic: refine (congrArg₂ _ ?_ rfl).trans (apply_dite (@φ _) (a' = a) _ _).symm
state_before: case h.h
α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
a : α
b : δ a
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
a' : α
ha' : a' ∈ a ::ₘ m
⊢ (fun h => ⋯ ▸ φ b) = fun h => φ (⋯ ▸ b)
state_after: case h.h.h
α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
a' : α
b : δ a'
ha' : a' ∈ a' ::ₘ m
⊢ ⋯ ▸ φ b = φ (⋯ ▸ b)
tactic: ext rfl
state_before: case h.h.h
α : Type u_1
inst✝ : DecidableEq α
δ : α → Sort u_2
m : Multiset α
f : (a' : α) → a' ∈ m → δ a'
δ' : α → Sort u_3
φ : ⦃a' : α⦄ → δ a' → δ' a'
a' : α
b : δ a'
ha' : a' ∈ a' ::ₘ m
⊢ ⋯ ▸ φ b = φ (⋯ ▸ b)
state_after: no goals
tactic: rfl
Theorem: List.keys_kerase
File: Mathlib/Data/List/Sigma.lean

Proof steps:
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ (kerase a l).keys = l.keys.erase a
state_after: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ map Sigma.fst (eraseP (fun s => decide (a = s.fst)) l) = map Sigma.fst (eraseP (fun x => a == x.fst) l)
tactic: rw [keys, kerase, erase_eq_eraseP, eraseP_map, Function.comp]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ map Sigma.fst (eraseP (fun s => decide (a = s.fst)) l) = map Sigma.fst (eraseP (fun x => a == x.fst) l)
state_after: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ map Sigma.fst (eraseP (fun s => decide (a = s.fst)) l) = map Sigma.fst (eraseP (fun x => decide (a = x.fst)) l)
tactic: simp only [beq_eq_decide]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ map Sigma.fst (eraseP (fun s => decide (a = s.fst)) l) = map Sigma.fst (eraseP (fun x => decide (a = x.fst)) l)
state_after: case e_a.e_p
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ (fun s => decide (a = s.fst)) = fun x => decide (a = x.fst)
tactic: congr
state_before: case e_a.e_p
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ (fun s => decide (a = s.fst)) = fun x => decide (a = x.fst)
state_after: case e_a.e_p.h
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
x✝ : Sigma β
⊢ decide (a = x✝.fst) = decide (a = x✝.fst)
tactic: funext
state_before: case e_a.e_p.h
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
x✝ : Sigma β
⊢ decide (a = x✝.fst) = decide (a = x✝.fst)
state_after: no goals
tactic: simp
Theorem: CategoryTheory.Functor.IsLocalization.of_equivalences
File: Mathlib/CategoryTheory/Localization/Equivalence.lean

Proof steps:
state_before: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁶ : Category.{u_6, u_1} C₁
inst✝⁵ : Category.{u_8, u_2} C₂
inst✝⁴ : Category.{?u.22854, u_3} D
inst✝³ : Category.{u_7, u_4} D₁
inst✝² : Category.{u_9, u_5} D₂
L₁ : C₁ ⥤ D₁
W₁ : MorphismProperty C₁
inst✝¹ : L₁.IsLocalization W₁
L₂ : C₂ ⥤ D₂
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
E' : D₁ ≌ D₂
inst✝ : CatCommSq E.functor L₁ L₂ E'.functor
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
⊢ L₂.IsLocalization W₂
state_after: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁶ : Category.{u_6, u_1} C₁
inst✝⁵ : Category.{u_8, u_2} C₂
inst✝⁴ : Category.{?u.22854, u_3} D
inst✝³ : Category.{u_7, u_4} D₁
inst✝² : Category.{u_9, u_5} D₂
L₁ : C₁ ⥤ D₁
W₁ : MorphismProperty C₁
inst✝¹ : L₁.IsLocalization W₁
L₂ : C₂ ⥤ D₂
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
E' : D₁ ≌ D₂
inst✝ : CatCommSq E.functor L₁ L₂ E'.functor
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
this : (E.functor ⋙ L₂).IsLocalization W₁
⊢ L₂.IsLocalization W₂
tactic: haveI : (E.functor ⋙ L₂).IsLocalization W₁ :=
    of_equivalence_target L₁ W₁ _ E' ((CatCommSq.iso _ _ _ _).symm)
state_before: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁶ : Category.{u_6, u_1} C₁
inst✝⁵ : Category.{u_8, u_2} C₂
inst✝⁴ : Category.{?u.22854, u_3} D
inst✝³ : Category.{u_7, u_4} D₁
inst✝² : Category.{u_9, u_5} D₂
L₁ : C₁ ⥤ D₁
W₁ : MorphismProperty C₁
inst✝¹ : L₁.IsLocalization W₁
L₂ : C₂ ⥤ D₂
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
E' : D₁ ≌ D₂
inst✝ : CatCommSq E.functor L₁ L₂ E'.functor
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
this : (E.functor ⋙ L₂).IsLocalization W₁
⊢ L₂.IsLocalization W₂
state_after: no goals
tactic: exact of_equivalence_source (E.functor ⋙ L₂) W₁ L₂ W₂ E hW₁ hW₂ (Iso.refl _)
Theorem: himp_inf_self
File: Mathlib/Order/Heyting/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c d a b : α
⊢ (a ⇨ b) ⊓ a = b ⊓ a
state_after: no goals
tactic: rw [inf_comm, inf_himp, inf_comm]
Theorem: one_lt_div
File: Mathlib/Algebra/Order/Field/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 < b
⊢ 1 < a / b ↔ b < a
state_after: no goals
tactic: rw [lt_div_iff hb, one_mul]
Theorem: Ordinal.sub_eq_zero_iff_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : a - b = 0
⊢ a ≤ b
state_after: no goals
tactic: simpa only [h, add_zero] using le_add_sub a b
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : a ≤ b
⊢ a - b = 0
state_after: no goals
tactic: rwa [← Ordinal.le_zero, sub_le, add_zero]
Theorem: legendreSym.sq_one'
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
⊢ legendreSym p (a ^ 2) = 1
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
⊢ (quadraticChar (ZMod p)) ↑(a ^ 2) = 1
tactic: dsimp only [legendreSym]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
⊢ (quadraticChar (ZMod p)) ↑(a ^ 2) = 1
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
⊢ (quadraticChar (ZMod p)) (↑a ^ 2) = 1
tactic: rw [Int.cast_pow]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
⊢ (quadraticChar (ZMod p)) (↑a ^ 2) = 1
state_after: no goals
tactic: exact quadraticChar_sq_one' ha
Theorem: skyscraperPresheaf_eq_pushforward
File: Mathlib/Topology/Sheaves/Skyscraper.lean

Proof steps:
state_before: X : TopCat
p₀ : ↑X
inst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝¹ : Category.{w, v} C
inst✝ : HasTerminal C
A : C
hd : (U : Opens ↑(of PUnit.{u + 1})) → Decidable (PUnit.unit ∈ U)
⊢ skyscraperPresheaf p₀ A =
    (Presheaf.pushforward C (ContinuousMap.const (↑(of PUnit.{u + 1})) p₀)).obj (skyscraperPresheaf PUnit.unit A)
state_after: no goals
tactic: convert_to @skyscraperPresheaf X p₀ (fun U => hd <| (Opens.map <| ContinuousMap.const _ p₀).obj U)
    C _ _ A = _ <;> congr
Theorem: List.map_length_splitWrtCompositionAux
File: Mathlib/Combinatorics/Enumerative/Composition.lean

Proof steps:
state_before: n : ℕ
α : Type u_1
ns : List ℕ
⊢ ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
state_after: case nil
n : ℕ
α : Type u_1
l : List α
h : True
⊢ map length (l.splitWrtCompositionAux []) = []

case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
⊢ map length (l.splitWrtCompositionAux (n :: ns)) = n :: ns
tactic: induction' ns with n ns IH <;> intro l h <;> simp at h
state_before: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
⊢ map length (l.splitWrtCompositionAux (n :: ns)) = n :: ns
state_after: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ map length (l.splitWrtCompositionAux (n :: ns)) = n :: ns
tactic: have := le_trans (Nat.le_add_right _ _) h
state_before: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ map length (l.splitWrtCompositionAux (n :: ns)) = n :: ns
state_after: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ map length (take n l :: (drop n l).splitWrtCompositionAux ns) = n :: ns
tactic: simp only [splitWrtCompositionAux_cons, this]
state_before: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ map length (take n l :: (drop n l).splitWrtCompositionAux ns) = n :: ns
state_after: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ (take n l).length :: map length ((drop n l).splitWrtCompositionAux ns) = n :: ns
tactic: dsimp
state_before: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ (take n l).length :: map length ((drop n l).splitWrtCompositionAux ns) = n :: ns
state_after: case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ n ≤ l.length

case cons
n✝ : ℕ
α : Type u_1
n : ℕ
ns : List ℕ
IH : ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns
l : List α
h : n + ns.sum ≤ l.length
this : n ≤ l.length
⊢ ns.sum ≤ l.length - n
tactic: rw [length_take, IH] <;> simp [length_drop]
Theorem: CategoryTheory.NatIso.ofComponents.app
File: Mathlib/CategoryTheory/NatIso.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G : C ⥤ D
X✝ Y : C
app' : (X : C) → F.obj X ≅ G.obj X
naturality : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app' Y).hom = (app' X).hom ≫ G.map f
X : C
⊢ (ofComponents app' naturality).app X = app' X
state_after: no goals
tactic: aesop
Theorem: Antitone.eq_of_le_of_le
File: Mathlib/Order/Monotone/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
δ : Type u_2
π : ι → Type u_3
r : α → α → Prop
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
a₁ a₂ : α
h_anti : Antitone f
h_fa : f a₁ = f a₂
i : α
h₁ : a₁ ≤ i
h₂ : i ≤ a₂
⊢ f i = f a₁
state_after: case a
ι : Type u_1
α : Type u
β : Type v
γ : Type w
δ : Type u_2
π : ι → Type u_3
r : α → α → Prop
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
a₁ a₂ : α
h_anti : Antitone f
h_fa : f a₁ = f a₂
i : α
h₁ : a₁ ≤ i
h₂ : i ≤ a₂
⊢ f i ≤ f a₁

case a
ι : Type u_1
α : Type u
β : Type v
γ : Type w
δ : Type u_2
π : ι → Type u_3
r : α → α → Prop
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
a₁ a₂ : α
h_anti : Antitone f
h_fa : f a₁ = f a₂
i : α
h₁ : a₁ ≤ i
h₂ : i ≤ a₂
⊢ f a₁ ≤ f i
tactic: apply le_antisymm
Theorem: InnerProductGeometry.norm_sub_eq_abs_sub_norm_iff_angle_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ ‖x - y‖ = |‖x‖ - ‖y‖| ↔ angle x y = 0
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
⊢ angle x y = 0
tactic: refine ⟨fun h => ?_, norm_sub_eq_abs_sub_norm_of_angle_eq_zero⟩
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
⊢ angle x y = 0
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
⊢ ⟪x, y⟫_ℝ = ‖x‖ * ‖y‖
tactic: rw [← inner_eq_mul_norm_iff_angle_eq_zero hx hy]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
⊢ ⟪x, y⟫_ℝ = ‖x‖ * ‖y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
h1 : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2
⊢ ⟪x, y⟫_ℝ = ‖x‖ * ‖y‖
tactic: have h1 : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2 := by
    rw [h]
    exact sq_abs (‖x‖ - ‖y‖)
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
h1 : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2
⊢ ⟪x, y⟫_ℝ = ‖x‖ * ‖y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
h1 : ‖x‖ ^ 2 - 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2
⊢ ⟪x, y⟫_ℝ = ‖x‖ * ‖y‖
tactic: rw [norm_sub_pow_two_real] at h1
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x - y‖ = |‖x‖ - ‖y‖|
h1 : ‖x‖ ^ 2 - 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2
⊢ ⟪x, y⟫_ℝ = ‖x‖ * ‖y‖
state_after: no goals
tactic: calc
    ⟪x, y⟫ = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 := by linarith
    _ = ‖x‖ * ‖y‖ := by ring
Theorem: PosNum.divMod_to_nat
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: d n : PosNum
⊢ ↑n / ↑d = ↑(d.divMod n).1 ∧ ↑n % ↑d = ↑(d.divMod n).2
state_after: d n : PosNum
⊢ ↑(d.divMod n).2 + ↑d * ↑(d.divMod n).1 = ↑n ∧ ↑(d.divMod n).2 < ↑d
tactic: rw [Nat.div_mod_unique (PosNum.cast_pos _)]
state_before: d n : PosNum
⊢ ↑(d.divMod n).2 + ↑d * ↑(d.divMod n).1 = ↑n ∧ ↑(d.divMod n).2 < ↑d
state_after: case one
d : PosNum
⊢ ↑(d.divMod one).2 + ↑d * ↑(d.divMod one).1 = ↑one ∧ ↑(d.divMod one).2 < ↑d

case bit1
d n : PosNum
IH : ↑(d.divMod n).2 + ↑d * ↑(d.divMod n).1 = ↑n ∧ ↑(d.divMod n).2 < ↑d
⊢ ↑(d.divMod n.bit1).2 + ↑d * ↑(d.divMod n.bit1).1 = ↑n.bit1 ∧ ↑(d.divMod n.bit1).2 < ↑d

case bit0
d n : PosNum
IH : ↑(d.divMod n).2 + ↑d * ↑(d.divMod n).1 = ↑n ∧ ↑(d.divMod n).2 < ↑d
⊢ ↑(d.divMod n.bit0).2 + ↑d * ↑(d.divMod n.bit0).1 = ↑n.bit0 ∧ ↑(d.divMod n.bit0).2 < ↑d
tactic: induction' n with n IH n IH
Theorem: SemidirectProduct.map_inl
File: Mathlib/GroupTheory/SemidirectProduct.lean

Proof steps:
state_before: N : Type u_1
G : Type u_2
H : Type u_3
inst✝⁴ : Group N
inst✝³ : Group G
inst✝² : Group H
φ : G →* MulAut N
N₁ : Type u_4
G₁ : Type u_5
inst✝¹ : Group N₁
inst✝ : Group G₁
φ₁ : G₁ →* MulAut N₁
f₁ : N →* N₁
f₂ : G →* G₁
h : ∀ (g : G), f₁.comp (MulEquiv.toMonoidHom (φ g)) = (MulEquiv.toMonoidHom (φ₁ (f₂ g))).comp f₁
n : N
⊢ (map f₁ f₂ h) (inl n) = inl (f₁ n)
state_after: no goals
tactic: simp [map]
Theorem: deriv.lhopital_zero_left_on_Ioo
File: Mathlib/Analysis/Calculus/LHopital.lean

Proof steps:
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : DifferentiableOn ℝ f (Ioo a b)
hg' : ∀ x ∈ Ioo a b, deriv g x ≠ 0
hfb : Tendsto f (𝓝[<] b) (𝓝 0)
hgb : Tendsto g (𝓝[<] b) (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[<] b) l
⊢ Tendsto (fun x => f x / g x) (𝓝[<] b) l
state_after: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf✝ : DifferentiableOn ℝ f (Ioo a b)
hg' : ∀ x ∈ Ioo a b, deriv g x ≠ 0
hfb : Tendsto f (𝓝[<] b) (𝓝 0)
hgb : Tendsto g (𝓝[<] b) (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[<] b) l
hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x
⊢ Tendsto (fun x => f x / g x) (𝓝[<] b) l
tactic: have hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x := fun x hx =>
    (hdf x hx).differentiableAt (Ioo_mem_nhds hx.1 hx.2)
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf✝ : DifferentiableOn ℝ f (Ioo a b)
hg' : ∀ x ∈ Ioo a b, deriv g x ≠ 0
hfb : Tendsto f (𝓝[<] b) (𝓝 0)
hgb : Tendsto g (𝓝[<] b) (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[<] b) l
hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x
⊢ Tendsto (fun x => f x / g x) (𝓝[<] b) l
state_after: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf✝ : DifferentiableOn ℝ f (Ioo a b)
hg' : ∀ x ∈ Ioo a b, deriv g x ≠ 0
hfb : Tendsto f (𝓝[<] b) (𝓝 0)
hgb : Tendsto g (𝓝[<] b) (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[<] b) l
hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x
hdg : ∀ x ∈ Ioo a b, DifferentiableAt ℝ g x
⊢ Tendsto (fun x => f x / g x) (𝓝[<] b) l
tactic: have hdg : ∀ x ∈ Ioo a b, DifferentiableAt ℝ g x := fun x hx =>
    by_contradiction fun h => hg' x hx (deriv_zero_of_not_differentiableAt h)
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf✝ : DifferentiableOn ℝ f (Ioo a b)
hg' : ∀ x ∈ Ioo a b, deriv g x ≠ 0
hfb : Tendsto f (𝓝[<] b) (𝓝 0)
hgb : Tendsto g (𝓝[<] b) (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[<] b) l
hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x
hdg : ∀ x ∈ Ioo a b, DifferentiableAt ℝ g x
⊢ Tendsto (fun x => f x / g x) (𝓝[<] b) l
state_after: no goals
tactic: exact HasDerivAt.lhopital_zero_left_on_Ioo hab (fun x hx => (hdf x hx).hasDerivAt)
    (fun x hx => (hdg x hx).hasDerivAt) hg' hfb hgb hdiv
Theorem: BoundedContinuousFunction.toContinuousMapAddHom_apply
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

Proof steps:
state_before: F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : AddMonoid β
inst✝¹ : BoundedAdd β
inst✝ : ContinuousAdd β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ∀ (x y : α →ᵇ β),
    { toFun := toContinuousMap, map_zero' := ⋯ }.toFun (x + y) =
      { toFun := toContinuousMap, map_zero' := ⋯ }.toFun x + { toFun := toContinuousMap, map_zero' := ⋯ }.toFun y
state_after: F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : AddMonoid β
inst✝¹ : BoundedAdd β
inst✝ : ContinuousAdd β
f g : α →ᵇ β
x : α
C : ℝ
x✝ y✝ : α →ᵇ β
⊢ { toFun := toContinuousMap, map_zero' := ⋯ }.toFun (x✝ + y✝) =
    { toFun := toContinuousMap, map_zero' := ⋯ }.toFun x✝ + { toFun := toContinuousMap, map_zero' := ⋯ }.toFun y✝
tactic: intros
state_before: F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : AddMonoid β
inst✝¹ : BoundedAdd β
inst✝ : ContinuousAdd β
f g : α →ᵇ β
x : α
C : ℝ
x✝ y✝ : α →ᵇ β
⊢ { toFun := toContinuousMap, map_zero' := ⋯ }.toFun (x✝ + y✝) =
    { toFun := toContinuousMap, map_zero' := ⋯ }.toFun x✝ + { toFun := toContinuousMap, map_zero' := ⋯ }.toFun y✝
state_after: case h
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : AddMonoid β
inst✝¹ : BoundedAdd β
inst✝ : ContinuousAdd β
f g : α →ᵇ β
x : α
C : ℝ
x✝ y✝ : α →ᵇ β
a✝ : α
⊢ ({ toFun := toContinuousMap, map_zero' := ⋯ }.toFun (x✝ + y✝)) a✝ =
    ({ toFun := toContinuousMap, map_zero' := ⋯ }.toFun x✝ + { toFun := toContinuousMap, map_zero' := ⋯ }.toFun y✝) a✝
tactic: ext
state_before: case h
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : AddMonoid β
inst✝¹ : BoundedAdd β
inst✝ : ContinuousAdd β
f g : α →ᵇ β
x : α
C : ℝ
x✝ y✝ : α →ᵇ β
a✝ : α
⊢ ({ toFun := toContinuousMap, map_zero' := ⋯ }.toFun (x✝ + y✝)) a✝ =
    ({ toFun := toContinuousMap, map_zero' := ⋯ }.toFun x✝ + { toFun := toContinuousMap, map_zero' := ⋯ }.toFun y✝) a✝
state_after: no goals
tactic: simp