ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: PythagoreanTriple.isPrimitiveClassified_of_coprime_of_zero_left
File: Mathlib/NumberTheory/PythagoreanTriples.lean

Proof steps:
state_before: x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hx : x = 0
⊢ h.IsPrimitiveClassified
state_after: y z : ℤ
h : PythagoreanTriple 0 y z
hc : Int.gcd 0 y = 1
⊢ h.IsPrimitiveClassified
tactic: subst x
state_before: y z : ℤ
h : PythagoreanTriple 0 y z
hc : Int.gcd 0 y = 1
⊢ h.IsPrimitiveClassified
state_after: y z : ℤ
h : PythagoreanTriple 0 y z
hc : Nat.gcd 0 y.natAbs = 1
⊢ h.IsPrimitiveClassified
tactic: change Nat.gcd 0 (Int.natAbs y) = 1 at hc
state_before: y z : ℤ
h : PythagoreanTriple 0 y z
hc : Nat.gcd 0 y.natAbs = 1
⊢ h.IsPrimitiveClassified
state_after: y z : ℤ
h : PythagoreanTriple 0 y z
hc : y.natAbs = 1
⊢ h.IsPrimitiveClassified
tactic: rw [Nat.gcd_zero_left (Int.natAbs y)] at hc
state_before: y z : ℤ
h : PythagoreanTriple 0 y z
hc : y.natAbs = 1
⊢ h.IsPrimitiveClassified
state_after: case inl
y z : ℤ
h : PythagoreanTriple 0 y z
hc : y.natAbs = 1
hy : y = ↑y.natAbs
⊢ h.IsPrimitiveClassified

case inr
y z : ℤ
h : PythagoreanTriple 0 y z
hc : y.natAbs = 1
hy : y = -↑y.natAbs
⊢ h.IsPrimitiveClassified
tactic: cases' Int.natAbs_eq y with hy hy
Theorem: Substring.ValidFor.valid
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l m r : List Char
⊢ l ++ (m ++ r) =
      { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
            stopPos := { byteIdx := utf8Len l + utf8Len m } }.str.data ∧
    { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
            stopPos := { byteIdx := utf8Len l + utf8Len m } }.startPos.byteIdx =
      utf8Len l
state_after: no goals
tactic: simp
state_before: l m r : List Char
⊢ l ++ m ++ r =
      { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
            stopPos := { byteIdx := utf8Len l + utf8Len m } }.str.data ∧
    { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
            stopPos := { byteIdx := utf8Len l + utf8Len m } }.stopPos.byteIdx =
      utf8Len (l ++ m)
state_after: no goals
tactic: simp
Theorem: Nat.mod_eq_iff_lt
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
h : m % n = m
⊢ m < n
state_after: a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
h : m % n = m
⊢ m % n < n
tactic: rw [← h]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
h : m % n = m
⊢ m % n < n
state_after: no goals
tactic: exact mod_lt _ $ Nat.pos_iff_ne_zero.2 hn
Theorem: IsAlgebraic.algHom
File: Mathlib/RingTheory/Algebraic.lean

Proof steps:
state_before: R : Type u
S : Type u_1
A : Type v
inst✝⁸ : CommRing R
inst✝⁷ : CommRing S
inst✝⁶ : Ring A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R S
inst✝³ : Algebra S A
inst✝² : IsScalarTower R S A
B : Type u_2
inst✝¹ : Ring B
inst✝ : Algebra R B
f : A →ₐ[R] B
a : A
h : IsAlgebraic R a
p : R[X]
hp : p ≠ 0
ha : (aeval a) p = 0
⊢ (aeval (f a)) p = 0
state_after: no goals
tactic: rw [aeval_algHom, f.comp_apply, ha, map_zero]
Theorem: QuadraticMap.anisotropic_of_pi
File: Mathlib/LinearAlgebra/QuadraticForm/Prod.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁴ : AddCommMonoid P
inst✝³ : (i : ι) → Module R (Mᵢ i)
inst✝² : (i : ι) → Module R (Nᵢ i)
inst✝¹ : Module R P
inst✝ : Fintype ι
Q : (i : ι) → QuadraticMap R (Mᵢ i) P
h : (pi Q).Anisotropic
⊢ ∀ (i : ι), (Q i).Anisotropic
state_after: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁴ : AddCommMonoid P
inst✝³ : (i : ι) → Module R (Mᵢ i)
inst✝² : (i : ι) → Module R (Nᵢ i)
inst✝¹ : Module R P
inst✝ : Fintype ι
Q : (i : ι) → QuadraticMap R (Mᵢ i) P
h : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, (Q i) (x i) = 0 → ∀ (a : ι), x a = 0
⊢ ∀ (i : ι), (Q i).Anisotropic
tactic: simp_rw [Anisotropic, pi_apply, Function.funext_iff, Pi.zero_apply] at h
state_before: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁴ : AddCommMonoid P
inst✝³ : (i : ι) → Module R (Mᵢ i)
inst✝² : (i : ι) → Module R (Nᵢ i)
inst✝¹ : Module R P
inst✝ : Fintype ι
Q : (i : ι) → QuadraticMap R (Mᵢ i) P
h : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, (Q i) (x i) = 0 → ∀ (a : ι), x a = 0
⊢ ∀ (i : ι), (Q i).Anisotropic
state_after: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁴ : AddCommMonoid P
inst✝³ : (i : ι) → Module R (Mᵢ i)
inst✝² : (i : ι) → Module R (Nᵢ i)
inst✝¹ : Module R P
inst✝ : Fintype ι
Q : (i : ι) → QuadraticMap R (Mᵢ i) P
h : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, (Q i) (x i) = 0 → ∀ (a : ι), x a = 0
i : ι
x : Mᵢ i
hx : (Q i) x = 0
⊢ x = 0
tactic: intro i x hx
Theorem: Finset.forall_mem_insert
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
a : α
s : Finset α
p : α → Prop
⊢ (∀ x ∈ insert a s, p x) ↔ p a ∧ ∀ x ∈ s, p x
state_after: no goals
tactic: simp only [mem_insert, or_imp, forall_and, forall_eq]
Theorem: IsCoatomic.of_isChain_bounded
File: Mathlib/Order/ZornAtoms.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
⊢ IsCoatomic α
state_after: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
⊢ ∃ a, IsCoatom a ∧ x ≤ a
tactic: refine ⟨fun x => le_top.eq_or_lt.imp_right fun hx => ?_⟩
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
⊢ ∃ a, IsCoatom a ∧ x ≤ a
state_after: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
this : ∃ y ∈ Ico x ⊤, x ≤ y ∧ ∀ z ∈ Ico x ⊤, y ≤ z → z = y
⊢ ∃ a, IsCoatom a ∧ x ≤ a
tactic: have : ∃ y ∈ Ico x ⊤, x ≤ y ∧ ∀ z ∈ Ico x ⊤, y ≤ z → z = y := by
    refine zorn_nonempty_partialOrder₀ (Ico x ⊤) (fun c hxc hc y hy => ?_) x (left_mem_Ico.2 hx)
    rcases h c hc ⟨y, hy⟩ fun h => (hxc h).2.ne rfl with ⟨z, hz, hcz⟩
    exact ⟨z, ⟨le_trans (hxc hy).1 (hcz hy), hz.lt_top⟩, hcz⟩
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
this : ∃ y ∈ Ico x ⊤, x ≤ y ∧ ∀ z ∈ Ico x ⊤, y ≤ z → z = y
⊢ ∃ a, IsCoatom a ∧ x ≤ a
state_after: case intro.intro.intro.intro
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
y : α
hxy : x ≤ y
hy : y < ⊤
hy' : ∀ z ∈ Ico x ⊤, y ≤ z → z = y
⊢ ∃ a, IsCoatom a ∧ x ≤ a
tactic: rcases this with ⟨y, ⟨hxy, hy⟩, -, hy'⟩
state_before: case intro.intro.intro.intro
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
y : α
hxy : x ≤ y
hy : y < ⊤
hy' : ∀ z ∈ Ico x ⊤, y ≤ z → z = y
⊢ ∃ a, IsCoatom a ∧ x ≤ a
state_after: case intro.intro.intro.intro
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
y : α
hxy : x ≤ y
hy : y < ⊤
hy' : ∀ z ∈ Ico x ⊤, y ≤ z → z = y
z : α
hyz : y < z
hz : z < ⊤
⊢ False
tactic: refine ⟨y, ⟨hy.ne, fun z hyz => le_top.eq_or_lt.resolve_right fun hz => ?_⟩, hxy⟩
state_before: case intro.intro.intro.intro
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : OrderTop α
h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c
x : α
hx : x < ⊤
y : α
hxy : x ≤ y
hy : y < ⊤
hy' : ∀ z ∈ Ico x ⊤, y ≤ z → z = y
z : α
hyz : y < z
hz : z < ⊤
⊢ False
state_after: no goals
tactic: exact hyz.ne' (hy' z ⟨hxy.trans hyz.le, hz⟩ hyz.le)
Theorem: OrderAddMonoidHom.mk_coe
File: Mathlib/Algebra/Order/Hom/Monoid.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝⁷ : Preorder α
inst✝⁶ : Preorder β
inst✝⁵ : Preorder γ
inst✝⁴ : Preorder δ
inst✝³ : MulOneClass α
inst✝² : MulOneClass β
inst✝¹ : MulOneClass γ
inst✝ : MulOneClass δ
f✝ g f : α →*o β
h : Monotone (↑↑f).toFun
⊢ { toMonoidHom := ↑f, monotone' := h } = f
state_after: case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝⁷ : Preorder α
inst✝⁶ : Preorder β
inst✝⁵ : Preorder γ
inst✝⁴ : Preorder δ
inst✝³ : MulOneClass α
inst✝² : MulOneClass β
inst✝¹ : MulOneClass γ
inst✝ : MulOneClass δ
f✝ g f : α →*o β
h : Monotone (↑↑f).toFun
a✝ : α
⊢ { toMonoidHom := ↑f, monotone' := h } a✝ = f a✝
tactic: ext
state_before: case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝⁷ : Preorder α
inst✝⁶ : Preorder β
inst✝⁵ : Preorder γ
inst✝⁴ : Preorder δ
inst✝³ : MulOneClass α
inst✝² : MulOneClass β
inst✝¹ : MulOneClass γ
inst✝ : MulOneClass δ
f✝ g f : α →*o β
h : Monotone (↑↑f).toFun
a✝ : α
⊢ { toMonoidHom := ↑f, monotone' := h } a✝ = f a✝
state_after: no goals
tactic: rfl
Theorem: Equiv.Perm.dvd_of_mem_cycleType
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
n : ℕ
h : n ∈ σ.cycleType
⊢ n ∣ orderOf σ
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
n : ℕ
h : n ∈ σ.cycleType
⊢ n ∣ σ.cycleType.lcm
tactic: rw [← lcm_cycleType]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
n : ℕ
h : n ∈ σ.cycleType
⊢ n ∣ σ.cycleType.lcm
state_after: no goals
tactic: exact dvd_lcm h
Theorem: MvPolynomial.bind₁_X_left
File: Mathlib/Algebra/MvPolynomial/Monad.lean

Proof steps:
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
⊢ bind₁ X = AlgHom.id R (MvPolynomial σ R)
state_after: case hf
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
i : σ
⊢ (bind₁ X) (X i) = (AlgHom.id R (MvPolynomial σ R)) (X i)
tactic: ext1 i
state_before: case hf
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
i : σ
⊢ (bind₁ X) (X i) = (AlgHom.id R (MvPolynomial σ R)) (X i)
state_after: no goals
tactic: simp
Theorem: MvPolynomial.map_bind₂
File: Mathlib/Algebra/MvPolynomial/Monad.lean

Proof steps:
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
g : S →+* T
φ : MvPolynomial σ R
⊢ (map g) ((bind₂ f) φ) = (bind₂ ((map g).comp f)) φ
state_after: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
g : S →+* T
φ : MvPolynomial σ R
⊢ eval₂ ((map g).comp f) (⇑(map g) ∘ X) φ = eval₂ ((map g).comp f) X φ
tactic: simp only [bind₂, eval₂_comp_right, coe_eval₂Hom, eval₂_map]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
g : S →+* T
φ : MvPolynomial σ R
⊢ eval₂ ((map g).comp f) (⇑(map g) ∘ X) φ = eval₂ ((map g).comp f) X φ
state_after: case e_g.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
g : S →+* T
φ : MvPolynomial σ R
x✝ : σ
⊢ (⇑(map g) ∘ X) x✝ = X x✝
tactic: congr 1 with : 1
state_before: case e_g.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
g : S →+* T
φ : MvPolynomial σ R
x✝ : σ
⊢ (⇑(map g) ∘ X) x✝ = X x✝
state_after: no goals
tactic: simp only [Function.comp_apply, map_X]
Theorem: Cardinal.lift_down
File: Mathlib/SetTheory/Cardinal/Basic.lean

Proof steps:
state_before: α✝ β✝ : Type u
a : Cardinal.{u}
b : Cardinal.{max u v}
α : Type u
β : Type (max u v)
⊢ #β ≤ lift.{v, u} #α → ∃ a', lift.{v, u} a' = #β
state_after: α✝ β✝ : Type u
a : Cardinal.{u}
b : Cardinal.{max u v}
α : Type u
β : Type (max u v)
⊢ Nonempty (β ↪ α) → ∃ a', lift.{max u v, u} a' = lift.{max u v, max u v} #β
tactic: rw [← lift_id #β, ← lift_umax, ← lift_umax.{u, v}, lift_mk_le.{v}]
state_before: α✝ β✝ : Type u
a : Cardinal.{u}
b : Cardinal.{max u v}
α : Type u
β : Type (max u v)
⊢ Nonempty (β ↪ α) → ∃ a', lift.{max u v, u} a' = lift.{max u v, max u v} #β
state_after: no goals
tactic: exact fun ⟨f⟩ =>
      ⟨#(Set.range f),
        Eq.symm <| lift_mk_eq.{_, _, v}.2
          ⟨Function.Embedding.equivOfSurjective (Embedding.codRestrict _ f Set.mem_range_self)
              fun ⟨a, ⟨b, e⟩⟩ => ⟨b, Subtype.eq e⟩⟩⟩
Theorem: OrderIso.map_tsub
File: Mathlib/Algebra/Order/Sub/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
⊢ e (a - b) = e a - e b
state_after: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
e_add : M ≃+ N := { toEquiv := e.toEquiv, map_add' := h_add }
⊢ e (a - b) = e a - e b
tactic: let e_add : M ≃+ N := { e with map_add' := h_add }
state_before: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
e_add : M ≃+ N := { toEquiv := e.toEquiv, map_add' := h_add }
⊢ e (a - b) = e a - e b
state_after: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
e_add : M ≃+ N := { toEquiv := e.toEquiv, map_add' := h_add }
⊢ e (a - b) ≤ e a - e b
tactic: refine le_antisymm ?_ (e_add.toAddHom.le_map_tsub e.monotone a b)
state_before: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
e_add : M ≃+ N := { toEquiv := e.toEquiv, map_add' := h_add }
⊢ e (a - b) ≤ e a - e b
state_after: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
e_add : M ≃+ N := { toEquiv := e.toEquiv, map_add' := h_add }
⊢ e (e.symm (e a) - e.symm (e b)) ≤ e (e.symm (e a - e b))
tactic: suffices e (e.symm (e a) - e.symm (e b)) ≤ e (e.symm (e a - e b)) by simpa
state_before: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
inst✝⁷ : Preorder M
inst✝⁶ : Add M
inst✝⁵ : Sub M
inst✝⁴ : OrderedSub M
inst✝³ : PartialOrder N
inst✝² : Add N
inst✝¹ : Sub N
inst✝ : OrderedSub N
e : M ≃o N
h_add : ∀ (a b : M), e (a + b) = e a + e b
a b : M
e_add : M ≃+ N := { toEquiv := e.toEquiv, map_add' := h_add }
⊢ e (e.symm (e a) - e.symm (e b)) ≤ e (e.symm (e a - e b))
state_after: no goals
tactic: exact e.monotone (e_add.symm.toAddHom.le_map_tsub e.symm.monotone _ _)
Theorem: Matrix.transposeᵣ_eq
File: Mathlib/Data/Matrix/Reflection.lean

Proof steps:
state_before: l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
A : Matrix (Fin m) (Fin (n + 1)) α
i : Fin (n + 1)
j : Fin m
⊢ A.transposeᵣ i j = Aᵀ i j
state_after: l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
A : Matrix (Fin m) (Fin (n + 1)) α
i : Fin (n + 1)
j : Fin m
⊢ of (vecCons (FinVec.map (fun v => v 0) A) (A.submatrix id Fin.succ)ᵀ) i j = Aᵀ i j
tactic: simp_rw [transposeᵣ, transposeᵣ_eq]
state_before: l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
A : Matrix (Fin m) (Fin (n + 1)) α
i : Fin (n + 1)
j : Fin m
⊢ of (vecCons (FinVec.map (fun v => v 0) A) (A.submatrix id Fin.succ)ᵀ) i j = Aᵀ i j
state_after: case refine_1
l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
A : Matrix (Fin m) (Fin (n + 1)) α
i : Fin (n + 1)
j : Fin m
⊢ of (vecCons (FinVec.map (fun v => v 0) A) (A.submatrix id Fin.succ)ᵀ) 0 j = Aᵀ 0 j

case refine_2
l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
A : Matrix (Fin m) (Fin (n + 1)) α
i✝ : Fin (n + 1)
j : Fin m
i : Fin n
⊢ of (vecCons (FinVec.map (fun v => v 0) A) (A.submatrix id Fin.succ)ᵀ) i.succ j = Aᵀ i.succ j
tactic: refine i.cases ?_ fun i => ?_
Theorem: Turing.ListBlank.append_assoc
File: Mathlib/Computability/TuringMachine.lean

Proof steps:
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l₁ l₂ : List Γ
l₃ : ListBlank Γ
⊢ append (l₁ ++ l₂) l₃ = append l₁ (append l₂ l₃)
state_after: Γ : Type u_1
inst✝ : Inhabited Γ
l₁ l₂ : List Γ
l₃ : ListBlank Γ
l : List Γ
⊢ append (l₁ ++ l₂) ⟦l⟧ = append l₁ (append l₂ ⟦l⟧)
tactic: refine l₃.inductionOn fun l ↦ ?_
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l₁ l₂ : List Γ
l₃ : ListBlank Γ
l : List Γ
⊢ append (l₁ ++ l₂) ⟦l⟧ = append l₁ (append l₂ ⟦l⟧)
state_after: Γ : Type u_1
inst✝ : Inhabited Γ
l₁ l₂ : List Γ
l₃ : ListBlank Γ
l : List Γ
⊢ append (l₁ ++ l₂) (mk l) = append l₁ (append l₂ (mk l))
tactic: suffices append (l₁ ++ l₂) (mk l) = append l₁ (append l₂ (mk l)) by exact this
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l₁ l₂ : List Γ
l₃ : ListBlank Γ
l : List Γ
⊢ append (l₁ ++ l₂) (mk l) = append l₁ (append l₂ (mk l))
state_after: no goals
tactic: simp only [ListBlank.append_mk, List.append_assoc]
Theorem: Finset.subset_product_image_fst
File: Mathlib/Data/Finset/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝ : DecidableEq α
i : α
⊢ i ∈ image Prod.fst (s ×ˢ t) → i ∈ s
state_after: no goals
tactic: simp (config := { contextual := true }) [mem_image]
Theorem: BoxIntegral.Prepartition.restrict_biUnion
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

Proof steps:
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
⊢ (π.biUnion πi).restrict J = πi J
state_after: case refine_1
ι : Type u_1
I J J₁✝ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
J₁ : Box ι
h₁ : J₁ ∈ (πi J).boxes
⊢ J₁ ∈ ((π.biUnion πi).restrict J).boxes

case refine_2
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
⊢ ((π.biUnion πi).restrict J).iUnion ⊆ (πi J).iUnion
tactic: refine (eq_of_boxes_subset_iUnion_superset (fun J₁ h₁ => ?_) ?_).symm
Theorem: Finset.lcm_image
File: Mathlib/Algebra/GCDMonoid/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s✝ s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
g : γ → β
s : Finset γ
⊢ (image g s).lcm f = s.lcm (f ∘ g)
state_after: no goals
tactic: classical induction' s using Finset.induction with c s _ ih <;> simp [*]
Theorem: CategoryTheory.ShortComplex.toCycles_moduleCatCyclesIso_hom
File: Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean

Proof steps:
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.toCycles ≫ S.moduleCatCyclesIso.hom = S.moduleCatToCycles
state_after: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.f = S.moduleCatToCycles ≫ (LinearMap.ker S.g).subtype
tactic: rw [← cancel_mono S.moduleCatLeftHomologyData.i, moduleCatLeftHomologyData_i,
    Category.assoc, S.moduleCatCyclesIso_hom_subtype, toCycles_i]
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.f = S.moduleCatToCycles ≫ (LinearMap.ker S.g).subtype
state_after: no goals
tactic: rfl
Theorem: ENNReal.tendsto_nhds_coe_iff
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
α : Type u_4
l : Filter α
x : ℝ≥0
f : ℝ≥0∞ → α
⊢ Tendsto f (𝓝 ↑x) l ↔ Tendsto (f ∘ ofNNReal) (𝓝 x) l
state_after: no goals
tactic: rw [nhds_coe, tendsto_map'_iff]
Theorem: Polynomial.eq_of_monic_of_associated
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
hq : q.Monic
hpq : Associated p q
⊢ p = q
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p r : R[X]
hp : p.Monic
u : R[X]ˣ
hq : (p * ↑u).Monic
⊢ p = p * ↑u
tactic: obtain ⟨u, rfl⟩ := hpq
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p r : R[X]
hp : p.Monic
u : R[X]ˣ
hq : (p * ↑u).Monic
⊢ p = p * ↑u
state_after: no goals
tactic: rw [(hp.of_mul_monic_left hq).eq_one_of_isUnit u.isUnit, mul_one]
Theorem: List.destutter'_eq_self_iff
File: Mathlib/Data/List/Destutter.lean

Proof steps:
state_before: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b a : α
h : destutter' R a l = a :: l
⊢ Chain R a l
state_after: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b a : α
h : destutter' R a l = a :: l
⊢ Chain' R (a :: l)
tactic: suffices Chain' R (a::l) by
      assumption
state_before: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b a : α
h : destutter' R a l = a :: l
⊢ Chain' R (a :: l)
state_after: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b a : α
h : destutter' R a l = a :: l
⊢ Chain' R (destutter' R a l)
tactic: rw [← h]
state_before: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b a : α
h : destutter' R a l = a :: l
⊢ Chain' R (destutter' R a l)
state_after: no goals
tactic: exact l.destutter'_is_chain' R a