ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Int.gcd_div
File: Mathlib/Data/Int/GCD.lean

Proof steps:
state_before: i j k : ℤ
H1 : k ∣ i
H2 : k ∣ j
⊢ (i / k).gcd (j / k) = i.gcd j / k.natAbs
state_after: i j k : ℤ
H1 : k ∣ i
H2 : k ∣ j
⊢ (i.natAbs / k.natAbs).gcd (j.natAbs / k.natAbs) = i.gcd j / k.natAbs
tactic: rw [gcd, natAbs_ediv i k H1, natAbs_ediv j k H2]
state_before: i j k : ℤ
H1 : k ∣ i
H2 : k ∣ j
⊢ (i.natAbs / k.natAbs).gcd (j.natAbs / k.natAbs) = i.gcd j / k.natAbs
state_after: no goals
tactic: exact Nat.gcd_div (natAbs_dvd_natAbs.mpr H1) (natAbs_dvd_natAbs.mpr H2)
Theorem: Real.Icc_eq_closedBall
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y : ℝ
⊢ Icc x y = closedBall ((x + y) / 2) ((y - x) / 2)
state_after: no goals
tactic: rw [Real.closedBall_eq_Icc, ← sub_div, add_comm, ← sub_add, add_sub_cancel_left, add_self_div_two,
    ← add_div, add_assoc, add_sub_cancel, add_self_div_two]
Theorem: jacobiSym.eq_zero_iff_not_coprime
File: Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean

Proof steps:
state_before: a : ℤ
b : ℕ
inst✝ : NeZero b
⊢ 0 ∈ List.pmap (fun p pp => legendreSym p a) b.primeFactorsList ⋯ ↔ a.gcd ↑b ≠ 1
state_after: a : ℤ
b : ℕ
inst✝ : NeZero b
⊢ (∃ a_1, ∃ (h : a_1 ∈ b.primeFactorsList), legendreSym a_1 a = 0) ↔ ∃ p, Nat.Prime p ∧ p ∣ a.natAbs ∧ p ∣ (↑b).natAbs
tactic: rw [List.mem_pmap, Int.gcd_eq_natAbs, Ne, Prime.not_coprime_iff_dvd]
state_before: a : ℤ
b : ℕ
inst✝ : NeZero b
⊢ (∃ a_1, ∃ (h : a_1 ∈ b.primeFactorsList), legendreSym a_1 a = 0) ↔ ∃ p, Nat.Prime p ∧ p ∣ a.natAbs ∧ p ∣ (↑b).natAbs
state_after: no goals
tactic: simp_rw [legendreSym.eq_zero_iff _ _, intCast_zmod_eq_zero_iff_dvd,
        mem_primeFactorsList (NeZero.ne b), ← Int.natCast_dvd, Int.natCast_dvd_natCast, exists_prop,
        and_assoc, and_comm]
Theorem: false_of_nontrivial_of_product_domain
File: Mathlib/Algebra/Ring/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
⊢ False
state_after: α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
this : (0, 1) = 0 ∨ (1, 0) = 0
⊢ False
tactic: have :=
    NoZeroDivisors.eq_zero_or_eq_zero_of_mul_eq_zero (show ((0 : R), (1 : S)) * (1, 0) = 0 by simp)
state_before: α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
this : (0, 1) = 0 ∨ (1, 0) = 0
⊢ False
state_after: α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
this : 0 = 0 ∧ 1 = 0 ∨ 1 = 0 ∧ 0 = 0
⊢ False
tactic: rw [Prod.mk_eq_zero, Prod.mk_eq_zero] at this
state_before: α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
this : 0 = 0 ∧ 1 = 0 ∨ 1 = 0 ∧ 0 = 0
⊢ False
state_after: case inl.intro
α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
left✝ : 0 = 0
h : 1 = 0
⊢ False

case inr.intro
α : Type u_1
β : Type u_2
R✝ : Type u_3
R' : Type u_4
S✝ : Type u_5
S' : Type u_6
T : Type u_7
T' : Type u_8
R : Type u_9
S : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring S
inst✝² : IsDomain (R × S)
inst✝¹ : Nontrivial R
inst✝ : Nontrivial S
h : 1 = 0
right✝ : 0 = 0
⊢ False
tactic: rcases this with (⟨_, h⟩ | ⟨h, _⟩)
Theorem: Finset.Ioo_subset_Ico_self
File: Mathlib/Order/Interval/Finset/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Ioo a b ⊆ Ico a b
state_after: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Set.Ioo a b ⊆ Set.Ico a b
tactic: rw [← coe_subset, coe_Ioo, coe_Ico]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Set.Ioo a b ⊆ Set.Ico a b
state_after: no goals
tactic: exact Set.Ioo_subset_Ico_self
Theorem: AddSubgroup.comap_map_eq_self
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁴ : Group G
inst✝³ : Group G'
inst✝² : Group G''
A : Type u_4
inst✝¹ : AddGroup A
N : Type u_5
inst✝ : Group N
f✝ f : G →* N
H : Subgroup G
h : f.ker ≤ H
⊢ comap f (map f H) = H
state_after: no goals
tactic: rwa [comap_map_eq, sup_eq_left]
Theorem: EuclideanGeometry.oangle_left_eq_arccos_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
⊢ ∡ p₃ p₁ p₂ = ↑(Real.arccos (dist p₁ p₂ / dist p₁ p₃))
state_after: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₃ p₁ p₂).sign = 1
⊢ ∡ p₃ p₁ p₂ = ↑(Real.arccos (dist p₁ p₂ / dist p₁ p₃))
tactic: have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₃ p₁ p₂).sign = 1
⊢ ∡ p₃ p₁ p₂ = ↑(Real.arccos (dist p₁ p₂ / dist p₁ p₃))
state_after: no goals
tactic: rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm,
    angle_eq_arccos_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h),
    dist_comm p₁ p₃]
Theorem: MonoidAlgebra.mul_apply_left
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

Proof steps:
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (f * g) x = sum f fun a b => (single a b * g) x
state_after: no goals
tactic: rw [← Finsupp.sum_apply, ← Finsupp.sum_mul g f, f.sum_single]
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (sum f fun a b => (single a b * g) x) = sum f fun a b => b * g (a⁻¹ * x)
state_after: no goals
tactic: simp only [single_mul_apply, Finsupp.sum]
Theorem: HomogeneousLocalization.den_smul_val
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f : HomogeneousLocalization 𝒜 x
⊢ f.den • f.val = (algebraMap A (at x)) f.num
state_after: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f : HomogeneousLocalization 𝒜 x
⊢ IsLocalization.mk' (at x) (f.den * f.num) ⟨f.den, ⋯⟩ = (algebraMap A (at x)) f.num
tactic: rw [eq_num_div_den, Localization.mk_eq_mk', IsLocalization.smul_mk']
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f : HomogeneousLocalization 𝒜 x
⊢ IsLocalization.mk' (at x) (f.den * f.num) ⟨f.den, ⋯⟩ = (algebraMap A (at x)) f.num
state_after: no goals
tactic: exact IsLocalization.mk'_mul_cancel_left _ ⟨_, _⟩
Theorem: Subgroup.rank_closure_finite_le_nat_card
File: Mathlib/GroupTheory/Finiteness.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
inst✝⁴ : Monoid M
inst✝³ : AddMonoid N
G : Type u_3
H : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup H
s : Set G
inst✝ : Finite ↑s
⊢ Group.rank ↥(closure s) ≤ Nat.card ↑s
state_after: M : Type u_1
N : Type u_2
inst✝⁴ : Monoid M
inst✝³ : AddMonoid N
G : Type u_3
H : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup H
s : Set G
inst✝ : Finite ↑s
this : Fintype ↑s
⊢ Group.rank ↥(closure s) ≤ Nat.card ↑s
tactic: haveI := Fintype.ofFinite s
state_before: M : Type u_1
N : Type u_2
inst✝⁴ : Monoid M
inst✝³ : AddMonoid N
G : Type u_3
H : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup H
s : Set G
inst✝ : Finite ↑s
this : Fintype ↑s
⊢ Group.rank ↥(closure s) ≤ Nat.card ↑s
state_after: M : Type u_1
N : Type u_2
inst✝⁴ : Monoid M
inst✝³ : AddMonoid N
G : Type u_3
H : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup H
s : Set G
inst✝ : Finite ↑s
this : Fintype ↑s
⊢ Group.rank ↥(closure ↑s.toFinset) ≤ s.toFinset.card
tactic: rw [Nat.card_eq_fintype_card, ← s.toFinset_card, ← rank_congr (congr_arg _ s.coe_toFinset)]
state_before: M : Type u_1
N : Type u_2
inst✝⁴ : Monoid M
inst✝³ : AddMonoid N
G : Type u_3
H : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup H
s : Set G
inst✝ : Finite ↑s
this : Fintype ↑s
⊢ Group.rank ↥(closure ↑s.toFinset) ≤ s.toFinset.card
state_after: no goals
tactic: exact rank_closure_finset_le_card s.toFinset
Theorem: Measurable.add_iff_right
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

Proof steps:
state_before: α : Type u_1
G : Type u_2
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSpace α
inst✝² : CommGroup G
inst✝¹ : MeasurableMul₂ G
inst✝ : MeasurableInv G
f g : α → G
hf : Measurable f
h : Measurable (f * g)
⊢ g = f * g * f⁻¹
state_after: no goals
tactic: simp only [mul_inv_cancel_comm]
Theorem: Rel.gc_leftDual_rightDual
File: Mathlib/Order/Rel/GaloisConnection.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R : Rel α β
J : Set α
I : (Set β)ᵒᵈ
h : (⇑toDual ∘ R.leftDual) J ≤ I
a : α
ha : a ∈ J
b : β
hb : b ∈ ofDual I
⊢ b ∈ I
state_after: no goals
tactic: simpa
state_before: α : Type u_1
β : Type u_2
R : Rel α β
J : Set α
I : (Set β)ᵒᵈ
h : J ≤ (R.rightDual ∘ ⇑ofDual) I
b : β
hb : b ∈ I
a : α
ha : a ∈ J
⊢ a ∈ J
state_after: no goals
tactic: simpa
Theorem: abs_mul_sign
File: Mathlib/Data/Sign.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
a b x : α
⊢ |x| * ↑(sign x) = x
state_after: no goals
tactic: rcases lt_trichotomy x 0 with hx | rfl | hx <;> simp [*, abs_of_pos, abs_of_neg]
Theorem: SetTheory.PGame.lt_iff_exists_le
File: Mathlib/SetTheory/Surreal/Basic.lean

Proof steps:
state_before: x y : PGame
ox : x.Numeric
oy : y.Numeric
⊢ x < y ↔ (∃ i, x ≤ y.moveLeft i) ∨ ∃ j, x.moveRight j ≤ y
state_after: no goals
tactic: rw [← lf_iff_lt ox oy, lf_iff_exists_le]
Theorem: PiLp.infty_equiv_isometry
File: Mathlib/Analysis/Normed/Lp/PiLp.lean

Proof steps:
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
x y : WithLp ⊤ ((i : ι) → β i)
⊢ edist ((WithLp.equiv ⊤ ((i : ι) → β i)) x) ((WithLp.equiv ⊤ ((i : ι) → β i)) y) ≤ edist x y
state_after: no goals
tactic: simpa only [ENNReal.coe_one, one_mul] using lipschitzWith_equiv ∞ β x y
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
x y : WithLp ⊤ ((i : ι) → β i)
⊢ edist x y ≤ edist ((WithLp.equiv ⊤ ((i : ι) → β i)) x) ((WithLp.equiv ⊤ ((i : ι) → β i)) y)
state_after: no goals
tactic: simpa only [ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero, ENNReal.coe_one,
        one_mul] using antilipschitzWith_equiv ∞ β x y
Theorem: MeasureTheory.SimpleFunc.lintegral_restrict
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
f : α →ₛ ℝ≥0∞
s : Set α
μ : Measure α
⊢ f.lintegral (μ.restrict s) = ∑ y ∈ f.range, y * μ (↑f ⁻¹' {y} ∩ s)
state_after: no goals
tactic: simp only [lintegral, Measure.restrict_apply, f.measurableSet_preimage]
Theorem: Submonoid.fg_iff_add_fg
File: Mathlib/GroupTheory/Finiteness.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : AddMonoid N
P : Submonoid M
h : P.FG
S : Set M
hS : closure S = P
hf : S.Finite
⊢ AddSubmonoid.closure (⇑Additive.toMul ⁻¹' S) = toAddSubmonoid P
state_after: no goals
tactic: simp [← Submonoid.toAddSubmonoid_closure, hS]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : AddMonoid N
P : Submonoid M
h : (toAddSubmonoid P).FG
T : Set (Additive M)
hT : AddSubmonoid.closure T = toAddSubmonoid P
hf : T.Finite
⊢ closure (⇑Multiplicative.ofAdd ⁻¹' T) = P
state_after: no goals
tactic: simp [← AddSubmonoid.toSubmonoid'_closure, hT]
Theorem: Nat.ne_of_odd_add
File: Mathlib/Algebra/Ring/Parity.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m n : ℕ
h : Odd (m + n)
hnot : m = n
⊢ False
state_after: no goals
tactic: simp [hnot] at h
Theorem: isOpen_iff_inter_of_iSup_eq_top
File: Mathlib/Topology/LocalAtTarget.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type u_3
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
⊢ IsOpen s ↔ ∀ (i : ι), IsOpen (s ∩ ↑(U i))
state_after: case mp
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type u_3
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
⊢ IsOpen s → ∀ (i : ι), IsOpen (s ∩ ↑(U i))

case mpr
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type u_3
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
⊢ (∀ (i : ι), IsOpen (s ∩ ↑(U i))) → IsOpen s
tactic: constructor
Theorem: Fintype.card_of_finset'
File: Mathlib/Data/Fintype/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : Set α
s : Finset α
H : ∀ (x : α), x ∈ s ↔ x ∈ p
inst✝ : Fintype ↑p
⊢ card ↑p = s.card
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
p : Set α
s : Finset α
H : ∀ (x : α), x ∈ s ↔ x ∈ p
inst✝ : Fintype ↑p
⊢ card ↑p = card ↑p
tactic: rw [← card_ofFinset s H]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : Set α
s : Finset α
H : ∀ (x : α), x ∈ s ↔ x ∈ p
inst✝ : Fintype ↑p
⊢ card ↑p = card ↑p
state_after: no goals
tactic: congr!
Theorem: Ordinal.CNF_foldr
File: Mathlib/SetTheory/Ordinal/CantorNormalForm.lean

Proof steps:
state_before: b o : Ordinal.{u_1}
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 (CNF b 0) = 0
state_after: b o : Ordinal.{u_1}
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 [] = 0
tactic: rw [CNF_zero]
state_before: b o : Ordinal.{u_1}
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 [] = 0
state_after: no goals
tactic: rfl
state_before: b o✝ o : Ordinal.{u_1}
ho : o ≠ 0
IH : foldr (fun p r => b ^ p.1 * p.2 + r) 0 (CNF b (o % b ^ log b o)) = o % b ^ log b o
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 (CNF b o) = o
state_after: no goals
tactic: rw [CNF_ne_zero ho, foldr_cons, IH, div_add_mod]
Theorem: pi_Ico_mem_nhds
File: Mathlib/Topology/Order/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁷ : TopologicalSpace α
inst✝⁶ : LinearOrder α
inst✝⁵ : OrderTopology α
ι : Type u_1
π : ι → Type u_2
inst✝⁴ : Finite ι
inst✝³ : (i : ι) → LinearOrder (π i)
inst✝² : (i : ι) → TopologicalSpace (π i)
inst✝¹ : ∀ (i : ι), OrderTopology (π i)
a b x : (i : ι) → π i
a' b' x' : ι → α
inst✝ : Nonempty ι
ha : ∀ (i : ι), a i < x i
hb : ∀ (i : ι), x i < b i
⊢ Ico a b ∈ 𝓝 x
state_after: α : Type u
β : Type v
γ : Type w
inst✝⁷ : TopologicalSpace α
inst✝⁶ : LinearOrder α
inst✝⁵ : OrderTopology α
ι : Type u_1
π : ι → Type u_2
inst✝⁴ : Finite ι
inst✝³ : (i : ι) → LinearOrder (π i)
inst✝² : (i : ι) → TopologicalSpace (π i)
inst✝¹ : ∀ (i : ι), OrderTopology (π i)
a b x : (i : ι) → π i
a' b' x' : ι → α
inst✝ : Nonempty ι
ha : ∀ (i : ι), a i < x i
hb : ∀ (i : ι), x i < b i
i : ι
x✝ : i ∈ univ
⊢ Ico (a i) (b i) ∈ 𝓝 (x i)
tactic: refine mem_of_superset (set_pi_mem_nhds Set.finite_univ fun i _ => ?_) (pi_univ_Ico_subset a b)
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁷ : TopologicalSpace α
inst✝⁶ : LinearOrder α
inst✝⁵ : OrderTopology α
ι : Type u_1
π : ι → Type u_2
inst✝⁴ : Finite ι
inst✝³ : (i : ι) → LinearOrder (π i)
inst✝² : (i : ι) → TopologicalSpace (π i)
inst✝¹ : ∀ (i : ι), OrderTopology (π i)
a b x : (i : ι) → π i
a' b' x' : ι → α
inst✝ : Nonempty ι
ha : ∀ (i : ι), a i < x i
hb : ∀ (i : ι), x i < b i
i : ι
x✝ : i ∈ univ
⊢ Ico (a i) (b i) ∈ 𝓝 (x i)
state_after: no goals
tactic: exact Ico_mem_nhds (ha i) (hb i)
Theorem: ack_succ_zero
File: Mathlib/Computability/Ackermann.lean

Proof steps:
state_before: m : ℕ
⊢ ack (m + 1) 0 = ack m 1
state_after: no goals
tactic: rw [ack]
Theorem: GenContFract.IntFractPair.exists_succ_nth_stream_of_fr_zero
File: Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

Proof steps:
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_succ_n : IntFractPair K
stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n
succ_nth_fr_eq_zero : ifp_succ_n.fr = 0
⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋
state_after: case intro.intro.intro
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_n : IntFractPair K
seq_nth_eq : IntFractPair.stream v n = some ifp_n
left✝ : ifp_n.fr ≠ 0
stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)
succ_nth_fr_eq_zero : (IntFractPair.of ifp_n.fr⁻¹).fr = 0
⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋
tactic: rcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with
    ⟨ifp_n, seq_nth_eq, _, rfl⟩
state_before: case intro.intro.intro
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_n : IntFractPair K
seq_nth_eq : IntFractPair.stream v n = some ifp_n
left✝ : ifp_n.fr ≠ 0
stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)
succ_nth_fr_eq_zero : (IntFractPair.of ifp_n.fr⁻¹).fr = 0
⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋
state_after: case intro.intro.intro
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_n : IntFractPair K
seq_nth_eq : IntFractPair.stream v n = some ifp_n
left✝ : ifp_n.fr ≠ 0
stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)
succ_nth_fr_eq_zero : (IntFractPair.of ifp_n.fr⁻¹).fr = 0
⊢ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋
tactic: refine ⟨ifp_n, seq_nth_eq, ?_⟩
state_before: case intro.intro.intro
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_n : IntFractPair K
seq_nth_eq : IntFractPair.stream v n = some ifp_n
left✝ : ifp_n.fr ≠ 0
stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)
succ_nth_fr_eq_zero : (IntFractPair.of ifp_n.fr⁻¹).fr = 0
⊢ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋
state_after: no goals
tactic: simpa only [IntFractPair.of, Int.fract, sub_eq_zero] using succ_nth_fr_eq_zero
Theorem: FiberBundle.totalSpaceMk_closedEmbedding
File: Mathlib/Topology/FiberBundle/Basic.lean

Proof steps:
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace B
inst✝⁴ : TopologicalSpace F
E : B → Type u_5
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (b : B) → TopologicalSpace (E b)
inst✝¹ : FiberBundle F E
inst✝ : T1Space B
x : B
⊢ IsClosed (range (TotalSpace.mk x))
state_after: ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace B
inst✝⁴ : TopologicalSpace F
E : B → Type u_5
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (b : B) → TopologicalSpace (E b)
inst✝¹ : FiberBundle F E
inst✝ : T1Space B
x : B
⊢ IsClosed (TotalSpace.proj ⁻¹' {x})
tactic: rw [TotalSpace.range_mk]
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace B
inst✝⁴ : TopologicalSpace F
E : B → Type u_5
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (b : B) → TopologicalSpace (E b)
inst✝¹ : FiberBundle F E
inst✝ : T1Space B
x : B
⊢ IsClosed (TotalSpace.proj ⁻¹' {x})
state_after: no goals
tactic: exact isClosed_singleton.preimage <| continuous_proj F E
Theorem: Real.Angle.coe_two_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

Proof steps:
state_before: ⊢ 2 * π - 0 = 2 * π * ↑1
state_after: no goals
tactic: rw [sub_zero, Int.cast_one, mul_one]
Theorem: Module.Flat.iff_lTensor_exact
File: Mathlib/RingTheory/Flat/Basic.lean

Proof steps:
state_before: R : Type u
M : Type v
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type w
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Small.{v, u} R
⊢ Flat R M ↔
    ∀ ⦃N N' N'' : Type v⦄ [inst : AddCommGroup N] [inst_1 : AddCommGroup N'] [inst_2 : AddCommGroup N'']
      [inst_3 : Module R N] [inst_4 : Module R N'] [inst_5 : Module R N''] ⦃f : N →ₗ[R] N'⦄ ⦃g : N' →ₗ[R] N''⦄,
      Function.Exact ⇑f ⇑g → Function.Exact ⇑(lTensor M f) ⇑(lTensor M g)
state_after: R : Type u
M : Type v
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type w
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Small.{v, u} R
H :
  ∀ ⦃N N' N'' : Type v⦄ [inst : AddCommGroup N] [inst_1 : AddCommGroup N'] [inst_2 : AddCommGroup N'']
    [inst_3 : Module R N] [inst_4 : Module R N'] [inst_5 : Module R N''] ⦃f : N →ₗ[R] N'⦄ ⦃g : N' →ₗ[R] N''⦄,
    Function.Exact ⇑f ⇑g → Function.Exact ⇑(lTensor M f) ⇑(lTensor M g)
N' N'' : Type v
x✝³ : AddCommGroup N'
x✝² : AddCommGroup N''
x✝¹ : Module R N'
x✝ : Module R N''
L : N' →ₗ[R] N''
hL : Function.Injective ⇑L
x : M ⊗[R] N'
hx : (lTensor M L) x = 0
⊢ x ∈ ⊥
tactic: refine ⟨fun _ => lTensor_exact M, fun H => iff_lTensor_preserves_injective_linearMap R M |>.mpr
    fun N' N'' _ _ _ _ L hL => LinearMap.ker_eq_bot |>.mp <| eq_bot_iff |>.mpr
      fun x (hx : _ = 0) => ?_⟩
state_before: R : Type u
M : Type v
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
N : Type w
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Small.{v, u} R
H :
  ∀ ⦃N N' N'' : Type v⦄ [inst : AddCommGroup N] [inst_1 : AddCommGroup N'] [inst_2 : AddCommGroup N'']
    [inst_3 : Module R N] [inst_4 : Module R N'] [inst_5 : Module R N''] ⦃f : N →ₗ[R] N'⦄ ⦃g : N' →ₗ[R] N''⦄,
    Function.Exact ⇑f ⇑g → Function.Exact ⇑(lTensor M f) ⇑(lTensor M g)
N' N'' : Type v
x✝³ : AddCommGroup N'
x✝² : AddCommGroup N''
x✝¹ : Module R N'
x✝ : Module R N''
L : N' →ₗ[R] N''
hL : Function.Injective ⇑L
x : M ⊗[R] N'
hx : (lTensor M L) x = 0
⊢ x ∈ ⊥
state_after: no goals
tactic: simpa [Eq.comm] using @H PUnit N' N'' _ _ _ _ _ _ 0 L (fun x => by aesop) x |>.mp hx