ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Fin.repeat_succ
File: Mathlib/Data/Fin/Tuple/Basic.lean

Proof steps:
state_before: m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
⊢ repeat m.succ a = append a (repeat m a) ∘ cast ⋯
state_after: m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
⊢ repeat m.succ a = append a (repeat m a) ∘ cast h
tactic: generalize_proofs h
state_before: m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
⊢ repeat m.succ a = append a (repeat m a) ∘ cast h
state_after: case h
m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
⊢ ∀ (x : Fin (m.succ * n)), repeat m.succ a x = (append a (repeat m a) ∘ cast h) x
tactic: apply funext
state_before: case h
m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
⊢ ∀ (x : Fin (m.succ * n)), repeat m.succ a x = (append a (repeat m a) ∘ cast h) x
state_after: case h
m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
⊢ ∀ (x : Fin (n + m * n)), repeat m.succ a (cast ⋯ x) = (append a (repeat m a) ∘ cast h) (cast ⋯ x)
tactic: rw [(Fin.rightInverse_cast h.symm).surjective.forall]
state_before: case h
m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
⊢ ∀ (x : Fin (n + m * n)), repeat m.succ a (cast ⋯ x) = (append a (repeat m a) ∘ cast h) (cast ⋯ x)
state_after: case h.refine_1
m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
l : Fin n
⊢ repeat m.succ a (cast ⋯ (castAdd (m * n) l)) = (append a (repeat m a) ∘ cast h) (cast ⋯ (castAdd (m * n) l))

case h.refine_2
m✝ n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
m : ℕ
h : m.succ * n = n + m * n
r : Fin (m * n)
⊢ repeat m.succ a (cast ⋯ (natAdd n r)) = (append a (repeat m a) ∘ cast h) (cast ⋯ (natAdd n r))
tactic: refine Fin.addCases (fun l => ?_) fun r => ?_
Theorem: Heyting.IsRegular.disjoint_compl_right_iff
File: Mathlib/Order/Heyting/Regular.lean

Proof steps:
state_before: α : Type u_1
inst✝ : HeytingAlgebra α
a b : α
hb : IsRegular b
⊢ Disjoint a bᶜ ↔ a ≤ b
state_after: no goals
tactic: rw [← le_compl_iff_disjoint_right, hb.eq]
Theorem: List.lookmap_cons_some
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
a b : α
l : List α
h : f a = some b
⊢ lookmap f (a :: l) = b :: l
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
a b : α
l : List α
h : f a = some b
⊢ (match f a with
    | some b => b :: l
    | none => lookmap.go f l (#[].push a)) =
    b :: l
tactic: simp only [lookmap, lookmap.go, Array.toListAppend_eq, Array.data_toArray, nil_append]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → Option α
a b : α
l : List α
h : f a = some b
⊢ (match f a with
    | some b => b :: l
    | none => lookmap.go f l (#[].push a)) =
    b :: l
state_after: no goals
tactic: rw [h]
Theorem: Real.hasDerivWithinAt_arcsin_Iic
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean

Proof steps:
state_before: x : ℝ
h : x ≠ 1
⊢ HasDerivWithinAt arcsin (1 / √(1 - x ^ 2)) (Iic x) x
state_after: case inl
h : -1 ≠ 1
⊢ HasDerivWithinAt arcsin (1 / √(1 - (-1) ^ 2)) (Iic (-1)) (-1)

case inr
x : ℝ
h : x ≠ 1
h' : ¬x = -1
⊢ HasDerivWithinAt arcsin (1 / √(1 - x ^ 2)) (Iic x) x
tactic: rcases em (x = -1) with (rfl | h')
Theorem: sub_sub_self
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a✝ b✝ c d a b : G
⊢ a / (a / b) = b
state_after: no goals
tactic: simp
Theorem: Nat.coprime_add_mul_left_left
File: Mathlib/Data/Nat/GCD/Basic.lean

Proof steps:
state_before: m n k : ℕ
⊢ (m + n * k).Coprime n ↔ m.Coprime n
state_after: no goals
tactic: rw [Coprime, Coprime, gcd_add_mul_left_left]
Theorem: Ideal.absNorm_bot
File: Mathlib/RingTheory/Ideal/Norm.lean

Proof steps:
state_before: S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
⊢ absNorm ⊥ = 0
state_after: no goals
tactic: rw [← Ideal.zero_eq_bot, _root_.map_zero]
Theorem: NormedRing.inverse_add
File: Mathlib/Analysis/Normed/Ring/Units.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
⊢ ∀ᶠ (t : R) in 𝓝 0, inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
state_after: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
⊢ ∀ᶠ (t : R) in 𝓝 0, inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
tactic: nontriviality R
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
⊢ ∀ᶠ (t : R) in 𝓝 0, inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
state_after: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
⊢ ∃ ε > 0, ∀ ⦃y : R⦄, dist y 0 < ε → inverse (↑x + y) = inverse (1 + ↑x⁻¹ * y) * ↑x⁻¹
tactic: rw [Metric.eventually_nhds_iff]
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
⊢ ∃ ε > 0, ∀ ⦃y : R⦄, dist y 0 < ε → inverse (↑x + y) = inverse (1 + ↑x⁻¹ * y) * ↑x⁻¹
state_after: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
t : R
ht : dist t 0 < ‖↑x⁻¹‖⁻¹
⊢ inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
tactic: refine ⟨‖(↑x⁻¹ : R)‖⁻¹, by cancel_denoms, fun t ht ↦ ?_⟩
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
t : R
ht : dist t 0 < ‖↑x⁻¹‖⁻¹
⊢ inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
state_after: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
t : R
ht : ‖t‖ < ‖↑x⁻¹‖⁻¹
⊢ inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
tactic: rw [dist_zero_right] at ht
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
a✝ : Nontrivial R
t : R
ht : ‖t‖ < ‖↑x⁻¹‖⁻¹
⊢ inverse (↑x + t) = inverse (1 + ↑x⁻¹ * t) * ↑x⁻¹
state_after: no goals
tactic: rw [← x.val_add t ht, inverse_unit, Units.add, Units.copy_eq, mul_inv_rev, Units.val_mul,
    ← inverse_unit, Units.val_oneSub, sub_neg_eq_add]
Theorem: MvPolynomial.optionEquivLeft_C
File: Mathlib/Algebra/MvPolynomial/Equiv.lean

Proof steps:
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
r : R
⊢ (optionEquivLeft R S₁) (C r) = Polynomial.C (C r)
state_after: no goals
tactic: simp only [optionEquivLeft_apply, aeval_C, Polynomial.algebraMap_apply, algebraMap_eq]
Theorem: SimpleGraph.Walk.fst_mem_support_of_mem_edges
File: Mathlib/Combinatorics/SimpleGraph/Walk.lean

Proof steps:
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : G.Walk v w
he : s(t, u) ∈ p.edges
⊢ t ∈ p.support
state_after: case intro.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : G.Walk v w
he✝ : s(t, u) ∈ p.edges
d : G.Dart
hd : d ∈ p.darts
he : d.edge = s(t, u)
⊢ t ∈ p.support
tactic: obtain ⟨d, hd, he⟩ := List.mem_map.mp he
state_before: case intro.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : G.Walk v w
he✝ : s(t, u) ∈ p.edges
d : G.Dart
hd : d ∈ p.darts
he : d.edge = s(t, u)
⊢ t ∈ p.support
state_after: case intro.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : G.Walk v w
he✝ : s(t, u) ∈ p.edges
d : G.Dart
hd : d ∈ p.darts
he : d.toProd.1 = t ∧ d.toProd.2 = u ∨ d.toProd.1 = u ∧ d.toProd.2 = t
⊢ t ∈ p.support
tactic: rw [dart_edge_eq_mk'_iff'] at he
state_before: case intro.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : G.Walk v w
he✝ : s(t, u) ∈ p.edges
d : G.Dart
hd : d ∈ p.darts
he : d.toProd.1 = t ∧ d.toProd.2 = u ∨ d.toProd.1 = u ∧ d.toProd.2 = t
⊢ t ∈ p.support
state_after: case intro.intro.inl.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
v w : V
p : G.Walk v w
d : G.Dart
hd : d ∈ p.darts
he : s(d.toProd.1, d.toProd.2) ∈ p.edges
⊢ d.toProd.1 ∈ p.support

case intro.intro.inr.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
v w : V
p : G.Walk v w
d : G.Dart
hd : d ∈ p.darts
he : s(d.toProd.2, d.toProd.1) ∈ p.edges
⊢ d.toProd.2 ∈ p.support
tactic: rcases he with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
Theorem: adjoin_monomial_eq_reesAlgebra
File: Mathlib/RingTheory/ReesAlgebra.lean

Proof steps:
state_before: R M : Type u
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal R
⊢ Algebra.adjoin R ↑(Submodule.map (monomial 1) I) = reesAlgebra I
state_after: case a
R M : Type u
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal R
⊢ Algebra.adjoin R ↑(Submodule.map (monomial 1) I) ≤ reesAlgebra I

case a
R M : Type u
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal R
⊢ reesAlgebra I ≤ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)
tactic: apply le_antisymm
Theorem: MulAction.smul_inv_mem_fixedBy_iff_mem_fixedBy
File: Mathlib/GroupTheory/GroupAction/FixedPoints.lean

Proof steps:
state_before: α : Type u_1
G : Type u_2
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u_3
inst✝¹ : Monoid M
inst✝ : MulAction M α
a : α
g : G
⊢ g⁻¹ • a ∈ fixedBy α g ↔ a ∈ fixedBy α g
state_after: no goals
tactic: rw [← fixedBy_inv, smul_mem_fixedBy_iff_mem_fixedBy, fixedBy_inv]
Theorem: Nat.ModEq.mul_right
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a b c✝ d c : ℕ
h : a ≡ b [MOD n]
⊢ a * c ≡ b * c [MOD n]
state_after: m n a b c✝ d c : ℕ
h : a ≡ b [MOD n]
⊢ c * a ≡ c * b [MOD n]
tactic: rw [mul_comm a, mul_comm b]
state_before: m n a b c✝ d c : ℕ
h : a ≡ b [MOD n]
⊢ c * a ≡ c * b [MOD n]
state_after: no goals
tactic: exact h.mul_left c
Theorem: PFunctor.Approx.truncate_eq_of_agree
File: Mathlib/Data/PFunctor/Univariate/M.lean

Proof steps:
state_before: F : PFunctor.{u}
n : ℕ
x : CofixA F n
y : CofixA F n.succ
h : Agree x y
⊢ truncate y = x
state_after: case zero.continue.intro
F : PFunctor.{u}
a✝¹ : F.A
a✝ : F.B a✝¹ → CofixA F 0
h : Agree CofixA.continue (CofixA.intro a✝¹ a✝)
⊢ truncate (CofixA.intro a✝¹ a✝) = CofixA.continue

case succ.intro.intro
F : PFunctor.{u}
n✝ : ℕ
a✝⁴ : ∀ (x : CofixA F n✝) (y : CofixA F n✝.succ), Agree x y → truncate y = x
a✝³ : F.A
a✝² : F.B a✝³ → CofixA F n✝
a✝¹ : F.A
a✝ : F.B a✝¹ → CofixA F (n✝ + 1)
h : Agree (CofixA.intro a✝³ a✝²) (CofixA.intro a✝¹ a✝)
⊢ truncate (CofixA.intro a✝¹ a✝) = CofixA.intro a✝³ a✝²
tactic: induction n <;> cases x <;> cases y
Theorem: ProbabilityTheory.setLIntegral_condKernel_univ_left
File: Mathlib/Probability/Kernel/Disintegration/Integral.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : Kernel α (β × Ω)
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
hf : Measurable f
a : α
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β), ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a = ∫⁻ (x : β × Ω) in Set.univ ×ˢ t, f x ∂κ a
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : Kernel α (β × Ω)
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
hf : Measurable f
a : α
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β), ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a =
    ∫⁻ (b : β) in Set.univ, ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a
tactic: rw [← setLIntegral_condKernel hf a MeasurableSet.univ ht]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : Kernel α (β × Ω)
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
hf : Measurable f
a : α
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β), ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a =
    ∫⁻ (b : β) in Set.univ, ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a
state_after: no goals
tactic: simp_rw [Measure.restrict_univ]
Theorem: Zsqrtd.exists_coprime_of_gcd_pos
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

Proof steps:
state_before: d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
⊢ ∃ b, a = ↑↑(a.re.gcd a.im) * b ∧ IsCoprime b.re b.im
state_after: case intro.intro.intro.intro
d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
re im : ℤ
H1 : re.gcd im = 1
Hre : a.re = re * ↑(a.re.gcd a.im)
Him : a.im = im * ↑(a.re.gcd a.im)
⊢ ∃ b, a = ↑↑(a.re.gcd a.im) * b ∧ IsCoprime b.re b.im
tactic: obtain ⟨re, im, H1, Hre, Him⟩ := Int.exists_gcd_one hgcd
state_before: case intro.intro.intro.intro
d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
re im : ℤ
H1 : re.gcd im = 1
Hre : a.re = re * ↑(a.re.gcd a.im)
Him : a.im = im * ↑(a.re.gcd a.im)
⊢ ∃ b, a = ↑↑(a.re.gcd a.im) * b ∧ IsCoprime b.re b.im
state_after: case intro.intro.intro.intro
d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
re im : ℤ
H1 : re.gcd im = 1
Hre : a.re = ↑(a.re.gcd a.im) * re
Him : a.im = ↑(a.re.gcd a.im) * im
⊢ ∃ b, a = ↑↑(a.re.gcd a.im) * b ∧ IsCoprime b.re b.im
tactic: rw [mul_comm] at Hre Him
state_before: case intro.intro.intro.intro
d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
re im : ℤ
H1 : re.gcd im = 1
Hre : a.re = ↑(a.re.gcd a.im) * re
Him : a.im = ↑(a.re.gcd a.im) * im
⊢ ∃ b, a = ↑↑(a.re.gcd a.im) * b ∧ IsCoprime b.re b.im
state_after: case intro.intro.intro.intro.refine_1
d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
re im : ℤ
H1 : re.gcd im = 1
Hre : a.re = ↑(a.re.gcd a.im) * re
Him : a.im = ↑(a.re.gcd a.im) * im
⊢ a = ↑↑(a.re.gcd a.im) * { re := re, im := im }

case intro.intro.intro.intro.refine_2
d : ℤ
a : ℤ√d
hgcd : 0 < a.re.gcd a.im
re im : ℤ
H1 : re.gcd im = 1
Hre : a.re = ↑(a.re.gcd a.im) * re
Him : a.im = ↑(a.re.gcd a.im) * im
⊢ IsCoprime { re := re, im := im }.re { re := re, im := im }.im
tactic: refine ⟨⟨re, im⟩, ?_, ?_⟩
Theorem: WittVector.RecursionBase.solution_nonzero
File: Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean

Proof steps:
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
⊢ solution p a₁ a₂ ≠ 0
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
h : solution p a₁ a₂ = 0
⊢ False
tactic: intro h
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
h : solution p a₁ a₂ = 0
⊢ False
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
h : solution p a₁ a₂ = 0
this : solution p a₁ a₂ ^ (p - 1) = a₂.coeff 0 / a₁.coeff 0
⊢ False
tactic: have := solution_spec p a₁ a₂
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
h : solution p a₁ a₂ = 0
this : solution p a₁ a₂ ^ (p - 1) = a₂.coeff 0 / a₁.coeff 0
⊢ False
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
h : solution p a₁ a₂ = 0
this : 0 = a₂.coeff 0 / a₁.coeff 0
⊢ False

p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : IsAlgClosed k
a₁ a₂ : 𝕎 k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
h : solution p a₁ a₂ = 0
this : 0 ^ (p - 1) = a₂.coeff 0 / a₁.coeff 0
⊢ p - 1 ≠ 0
tactic: rw [h, zero_pow] at this
Theorem: Batteries.RBNode.reverse_balance1
File: .lake/packages/batteries/Batteries/Data/RBMap/WF.lean

Proof steps:
state_before: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (l.balance1 v r).reverse = r.reverse.balance2 v l.reverse
state_after: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (match l, v, r with
      | node red (node red a x b) y c, z, d => node red (node black a x b) y (node black c z d)
      | node red a x (node red b y c), z, d => node red (node black a x b) y (node black c z d)
      | a, x, b => node black a x b).reverse =
    match r.reverse, v, l.reverse with
    | a, x, node red b y (node red c z d) => node red (node black a x b) y (node black c z d)
    | a, x, node red (node red b y c) z d => node red (node black a x b) y (node black c z d)
    | a, x, b => node black a x b
tactic: unfold balance1 balance2
state_before: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (match l, v, r with
      | node red (node red a x b) y c, z, d => node red (node black a x b) y (node black c z d)
      | node red a x (node red b y c), z, d => node red (node black a x b) y (node black c z d)
      | a, x, b => node black a x b).reverse =
    match r.reverse, v, l.reverse with
    | a, x, node red b y (node red c z d) => node red (node black a x b) y (node black c z d)
    | a, x, node red (node red b y c) z d => node red (node black a x b) y (node black c z d)
    | a, x, b => node black a x b
state_after: case h_2
α : Type u_1
v : α
r x✝⁴ : RBNode α
x✝³ : α
x✝² a✝ : RBNode α
x✝¹ : α
b✝ : RBNode α
y✝ : α
c✝ : RBNode α
x✝ : ∀ (a : RBNode α) (x : α) (b : RBNode α), a✝ = node red a x b → False
⊢ node red (node black r.reverse v c✝.reverse) y✝ (node black b✝.reverse x✝¹ a✝.reverse) =
    match r.reverse, v, node red (node red c✝.reverse y✝ b✝.reverse) x✝¹ a✝.reverse with
    | a, x, node red b y (node red c z d) => node red (node black a x b) y (node black c z d)
    | a, x, node red (node red b y c) z d => node red (node black a x b) y (node black c z d)
    | a, x, b => node black a x b

case h_3
α : Type u_1
l : RBNode α
v : α
r x✝⁴ : RBNode α
x✝³ : α
x✝² : RBNode α
x✝¹ : ∀ (a : RBNode α) (x : α) (b : RBNode α) (y : α) (c : RBNode α), l = node red (node red a x b) y c → False
x✝ : ∀ (a : RBNode α) (x : α) (b : RBNode α) (y : α) (c : RBNode α), l = node red a x (node red b y c) → False
⊢ node black r.reverse v l.reverse =
    match r.reverse, v, l.reverse with
    | a, x, node red b y (node red c z d) => node red (node black a x b) y (node black c z d)
    | a, x, node red (node red b y c) z d => node red (node black a x b) y (node black c z d)
    | a, x, b => node black a x b
tactic: split <;> simp
Theorem: CategoryTheory.GrothendieckTopology.OneHypercover.multiforkLift_map
File: Mathlib/CategoryTheory/Sites/OneHypercover.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
A : Type u_1
inst✝ : Category.{u_3, u_1} A
J : GrothendieckTopology C
S : C
E : J.OneHypercover S
F : Sheaf J A
c : Multifork (E.multicospanIndex F.val)
i₀ : E.I₀
⊢ multiforkLift c ≫ F.val.map (E.f i₀).op = c.ι i₀
state_after: no goals
tactic: simp [multiforkLift]
Theorem: toIocDiv_zsmul_sub_toIocMod
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocDiv hp a b • p + toIocMod hp a b = b
state_after: no goals
tactic: rw [add_comm, toIocMod_add_toIocDiv_zsmul]
Theorem: PadicInt.coe_eq_zero
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z : ℤ_[p]
⊢ ↑z = 0 ↔ z = 0
state_after: no goals
tactic: rw [← coe_zero, Subtype.coe_inj]
Theorem: Matrix.stdBasis_eq_stdBasisMatrix
File: Mathlib/LinearAlgebra/StdBasis.lean

Proof steps:
state_before: R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
⊢ (stdBasis R m n) (i, j) = stdBasisMatrix i j 1
state_after: case a
R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
a : m
b : n
⊢ (stdBasis R m n) (i, j) a b = stdBasisMatrix i j 1 a b
tactic: ext a b
state_before: case a
R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
a : m
b : n
⊢ (stdBasis R m n) (i, j) a b = stdBasisMatrix i j 1 a b
state_after: case pos
R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
a : m
b : n
hi : i = a
hj : j = b
⊢ (stdBasis R m n) (i, j) a b = stdBasisMatrix i j 1 a b

case neg
R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
a : m
b : n
hi : i = a
hj : ¬j = b
⊢ (stdBasis R m n) (i, j) a b = stdBasisMatrix i j 1 a b

case pos
R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
a : m
b : n
hi : ¬i = a
hj : j = b
⊢ (stdBasis R m n) (i, j) a b = stdBasisMatrix i j 1 a b

case neg
R : Type u_1
m : Type u_2
n : Type u_3
inst✝⁴ : Fintype m
inst✝³ : Finite n
inst✝² : Semiring R
i : m
j : n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
a : m
b : n
hi : ¬i = a
hj : ¬j = b
⊢ (stdBasis R m n) (i, j) a b = stdBasisMatrix i j 1 a b
tactic: by_cases hi : i = a <;> by_cases hj : j = b
Theorem: Stream'.Seq.le_stable
File: Mathlib/Data/Seq/Seq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s : Seq α
m n : ℕ
h : m ≤ n
⊢ s.get? m = none → s.get? n = none
state_after: case mk
α : Type u
β : Type v
γ : Type w
m n : ℕ
h : m ≤ n
f : Stream' (Option α)
al : f.IsSeq
⊢ get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ n = none
tactic: cases' s with f al
state_before: case mk
α : Type u
β : Type v
γ : Type w
m n : ℕ
h : m ≤ n
f : Stream' (Option α)
al : f.IsSeq
⊢ get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ n = none
state_after: case mk.refl
α : Type u
β : Type v
γ : Type w
m n : ℕ
f : Stream' (Option α)
al : f.IsSeq
⊢ get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ m = none

case mk.step
α : Type u
β : Type v
γ : Type w
m n✝ : ℕ
f : Stream' (Option α)
al : f.IsSeq
n : ℕ
a✝ : m.le n
IH : get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ n = none
⊢ get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ n.succ = none
tactic: induction' h with n _ IH
state_before: case mk.refl
α : Type u
β : Type v
γ : Type w
m n : ℕ
f : Stream' (Option α)
al : f.IsSeq
⊢ get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ m = none

case mk.step
α : Type u
β : Type v
γ : Type w
m n✝ : ℕ
f : Stream' (Option α)
al : f.IsSeq
n : ℕ
a✝ : m.le n
IH : get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ n = none
⊢ get? ⟨f, al⟩ m = none → get? ⟨f, al⟩ n.succ = none
state_after: no goals
tactic: exacts [id, fun h2 => al (IH h2)]
Theorem: Finset.two_lt_card
File: Mathlib/Data/Finset/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
⊢ 2 < s.card ↔ ∃ a ∈ s, ∃ b ∈ s, ∃ c ∈ s, a ≠ b ∧ a ≠ c ∧ b ≠ c
state_after: no goals
tactic: simp_rw [two_lt_card_iff, exists_and_left]