ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Ordinal.nfp_mul_eq_opow_omega
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

Proof steps:
state_before: a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
⊢ nfp (fun x => a * x) b = a ^ ω
state_after: case inl
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : a = 0
⊢ nfp (fun x => a * x) b = a ^ ω

case inr
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) b = a ^ ω
tactic: rcases eq_zero_or_pos a with ha | ha
state_before: case inr
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) b = a ^ ω
state_after: case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) b ≤ a ^ ω

case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ a ^ ω ≤ nfp (fun x => a * x) b
tactic: apply le_antisymm
state_before: case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ a ^ ω ≤ nfp (fun x => a * x) b
state_after: case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) 1 ≤ nfp (fun x => a * x) b
tactic: rw [← nfp_mul_one ha]
state_before: case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) 1 ≤ nfp (fun x => a * x) b
state_after: no goals
tactic: exact nfp_monotone (mul_isNormal ha).monotone (one_le_iff_pos.2 hb)
Theorem: MeasureTheory.AEStronglyMeasurable.integrable_truncation
File: Mathlib/Probability/StrongLaw.lean

Proof steps:
state_before: α : Type u_1
m : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : IsFiniteMeasure μ
hf : AEStronglyMeasurable f μ
A : ℝ
⊢ Integrable (truncation f A) μ
state_after: α : Type u_1
m : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : IsFiniteMeasure μ
hf : AEStronglyMeasurable f μ
A : ℝ
⊢ Memℒp (truncation f A) 1 μ
tactic: rw [← memℒp_one_iff_integrable]
state_before: α : Type u_1
m : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : IsFiniteMeasure μ
hf : AEStronglyMeasurable f μ
A : ℝ
⊢ Memℒp (truncation f A) 1 μ
state_after: no goals
tactic: exact hf.memℒp_truncation
Theorem: CategoryTheory.GrothendieckTopology.isClosed_pullback
File: Mathlib/CategoryTheory/Sites/Closed.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
hS : J₁.IsClosed S
Z : C
g : Z ⟶ Y
hg : J₁.Covers (Sieve.pullback f S) g
⊢ J₁.Covers S (g ≫ f)
state_after: no goals
tactic: rwa [J₁.covers_iff, Sieve.pullback_comp]
Theorem: List.isRotated_next_eq
File: Mathlib/Data/List/Cycle.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l l' : List α
h : l ~r l'
hn : l.Nodup
x : α
hx : x ∈ l
⊢ l.next x hx = l'.next x ⋯
state_after: case intro.refl
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l l' : List α
h : l ~r l'
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
⊢ l.next (l.get k) hx = l'.next (l.get k) ⋯
tactic: obtain ⟨k, hk, rfl⟩ := get_of_mem hx
state_before: case intro.refl
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l l' : List α
h : l ~r l'
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
⊢ l.next (l.get k) hx = l'.next (l.get k) ⋯
state_after: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ l.next (l.get k) hx = (l.rotate n).next (l.get k) ⋯
tactic: obtain ⟨n, rfl⟩ := id h
state_before: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ l.next (l.get k) hx = (l.rotate n).next (l.get k) ⋯
state_after: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ l.get ⟨(↑k + 1) % l.length, ⋯⟩ = (l.rotate n).next (l.get k) ⋯
tactic: rw [next_get _ hn]
state_before: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ l.get ⟨(↑k + 1) % l.length, ⋯⟩ = (l.rotate n).next (l.get k) ⋯
state_after: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ l.get ⟨(↑k + 1) % l.length, ⋯⟩ = (l.rotate n).next ((l.rotate n).get ⟨(l.length - n % l.length + ↑k) % l.length, ⋯⟩) ⋯
tactic: simp_rw [get_eq_get_rotate _ n k]
state_before: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ l.get ⟨(↑k + 1) % l.length, ⋯⟩ = (l.rotate n).next ((l.rotate n).get ⟨(l.length - n % l.length + ↑k) % l.length, ⋯⟩) ⋯
state_after: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ (l.rotate n).get ⟨(l.length - n % l.length + ↑⟨(↑k + 1) % l.length, ⋯⟩) % l.length, ⋯⟩ =
    (l.rotate n).get ⟨(↑⟨(l.length - n % l.length + ↑k) % l.length, ⋯⟩ + 1) % (l.rotate n).length, ⋯⟩
tactic: rw [next_get _ (h.nodup_iff.mp hn), get_eq_get_rotate _ n]
state_before: case intro.refl.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
hn : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
n : ℕ
h : l ~r l.rotate n
⊢ (l.rotate n).get ⟨(l.length - n % l.length + ↑⟨(↑k + 1) % l.length, ⋯⟩) % l.length, ⋯⟩ =
    (l.rotate n).get ⟨(↑⟨(l.length - n % l.length + ↑k) % l.length, ⋯⟩ + 1) % (l.rotate n).length, ⋯⟩
state_after: no goals
tactic: simp [add_assoc]
Theorem: WeierstrassCurve.preΨ_ne_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℤ
h : ↑n ≠ 0
⊢ W.preΨ n ≠ 0
state_after: no goals
tactic: induction n using Int.negInduction with
  | nat n => simpa only [preΨ_ofNat] using W.preΨ'_ne_zero <| by exact_mod_cast h
  | neg n ih => simpa only [preΨ_neg, neg_ne_zero] using ih <| neg_ne_zero.mp <| by exact_mod_cast h
Theorem: Real.Angle.toReal_injective
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

Proof steps:
state_before: ⊢ Function.Injective toReal
state_after: θ ψ : Angle
h : θ.toReal = ψ.toReal
⊢ θ = ψ
tactic: intro θ ψ h
state_before: θ ψ : Angle
h : θ.toReal = ψ.toReal
⊢ θ = ψ
state_after: case h
ψ : Angle
x✝ : ℝ
h : (↑x✝).toReal = ψ.toReal
⊢ ↑x✝ = ψ
tactic: induction θ using Real.Angle.induction_on
state_before: case h
ψ : Angle
x✝ : ℝ
h : (↑x✝).toReal = ψ.toReal
⊢ ↑x✝ = ψ
state_after: case h.h
x✝¹ x✝ : ℝ
h : (↑x✝¹).toReal = (↑x✝).toReal
⊢ ↑x✝¹ = ↑x✝
tactic: induction ψ using Real.Angle.induction_on
state_before: case h.h
x✝¹ x✝ : ℝ
h : (↑x✝¹).toReal = (↑x✝).toReal
⊢ ↑x✝¹ = ↑x✝
state_after: no goals
tactic: simpa [toReal_coe, toIocMod_eq_toIocMod, zsmul_eq_mul, mul_comm _ (2 * π), ←
    angle_eq_iff_two_pi_dvd_sub, eq_comm] using h
Theorem: AlgebraicGeometry.StructureSheaf.comap_id
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

Proof steps:
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
p : ↑(PrimeSpectrum.Top R)
hpV : p ∈ V.carrier
⊢ p ∈ ⇑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier
state_after: no goals
tactic: rwa [hUV, PrimeSpectrum.comap_id]
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
⊢ (structureSheaf R).val.obj (op U) = (structureSheaf R).val.obj (op V)
state_after: no goals
tactic: rw [hUV]
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
⊢ comap (RingHom.id R) U V ⋯ = eqToHom ⋯
state_after: no goals
tactic: erw [comap_id_eq_map U V (eqToHom hUV.symm), eqToHom_op, eqToHom_map]
Theorem: Set.image2_left_identity
File: Mathlib/Data/Set/NAry.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
f✝ f' : α → β → γ
g g' : α → β → γ → δ
s s' : Set α
t✝ t' : Set β
u u' : Set γ
v : Set δ
a✝ a' : α
b b' : β
c c' : γ
d d' : δ
f : α → β → β
a : α
h : ∀ (b : β), f a b = b
t : Set β
⊢ image2 f {a} t = t
state_after: no goals
tactic: rw [image2_singleton_left, show f a = id from funext h, image_id]
Theorem: Matroid.loopyOn_base_iff
File: Mathlib/Data/Matroid/Constructions.lean

Proof steps:
state_before: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ (loopyOn E).Base B ↔ B = ∅
state_after: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ B = ∅ → B ⊆ ∅ → B = ∅
tactic: simp only [base_iff_maximal_indep, loopyOn_indep_iff, forall_eq, and_iff_left_iff_imp]
state_before: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ B = ∅ → B ⊆ ∅ → B = ∅
state_after: no goals
tactic: exact fun h _ ↦ h
Theorem: Finset.gcd_eq_zero_iff
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 : β → α
⊢ s.gcd f = 0 ↔ ∀ x ∈ s, f x = 0
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
⊢ (∀ x ∈ Multiset.map f s.val, x = 0) ↔ ∀ x ∈ s, f x = 0
tactic: rw [gcd_def, Multiset.gcd_eq_zero_iff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
⊢ (∀ x ∈ Multiset.map f s.val, x = 0) ↔ ∀ x ∈ s, f x = 0
state_after: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
⊢ ∀ x ∈ s, f x = 0

case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
⊢ ∀ x ∈ Multiset.map f s.val, x = 0
tactic: constructor <;> intro h
Theorem: MeasureTheory.Measure.OuterRegular.measure_closure_eq_of_isCompact
File: Mathlib/MeasureTheory/Measure/Regular.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
⊢ μ (closure k) = μ k
state_after: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
⊢ μ (closure k) ≤ μ k
tactic: apply le_antisymm ?_ (measure_mono subset_closure)
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
⊢ μ (closure k) ≤ μ k
state_after: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
⊢ ∀ (i : Set α), k ⊆ i → IsOpen i → μ (closure k) ≤ μ i
tactic: simp only [measure_eq_iInf_isOpen k, le_iInf_iff]
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
⊢ ∀ (i : Set α), k ⊆ i → IsOpen i → μ (closure k) ≤ μ i
state_after: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
u : Set α
ku : k ⊆ u
u_open : IsOpen u
⊢ μ (closure k) ≤ μ u
tactic: intro u ku u_open
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : R1Space α
inst✝ : μ.OuterRegular
k : Set α
hk : IsCompact k
u : Set α
ku : k ⊆ u
u_open : IsOpen u
⊢ μ (closure k) ≤ μ u
state_after: no goals
tactic: exact measure_mono (hk.closure_subset_of_isOpen u_open ku)
Theorem: PosNum.bit0_of_bit0
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
p : PosNum
⊢ (p + p).succ.bit0 = p.bit1.bit0
state_after: no goals
tactic: rw [bit0_of_bit0 p, succ]
Theorem: sdiff_inf_self_left
File: Mathlib/Order/Heyting/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedCoheytingAlgebra α
a✝ b✝ c d a b : α
⊢ a \ (a ⊓ b) = a \ b
state_after: no goals
tactic: rw [sdiff_inf, sdiff_self, bot_sup_eq]
Theorem: Polynomial.natTrailingDegree_natCast
File: Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ (↑n).natTrailingDegree = 0
state_after: no goals
tactic: simp only [← C_eq_natCast, natTrailingDegree_C]
Theorem: IsWellOrderLimitElement.neq_bot
File: Mathlib/Order/IsWellOrderLimitElement.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : LinearOrder α
a : α
ha : IsWellOrderLimitElement a
inst✝ : OrderBot α
⊢ a ≠ ⊥
state_after: α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
ha : IsWellOrderLimitElement ⊥
⊢ False
tactic: rintro rfl
state_before: α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
ha : IsWellOrderLimitElement ⊥
⊢ False
state_after: case intro
α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
ha : IsWellOrderLimitElement ⊥
b : α
hb : b < ⊥
⊢ False
tactic: obtain ⟨b, hb⟩ := ha.not_bot
state_before: case intro
α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
ha : IsWellOrderLimitElement ⊥
b : α
hb : b < ⊥
⊢ False
state_after: no goals
tactic: simp at hb
Theorem: IsLocalization.coeffIntegerNormalization_mem_support
File: Mathlib/RingTheory/Localization/Integral.lean

Proof steps:
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
h : coeffIntegerNormalization M p i ≠ 0
⊢ i ∈ p.support
state_after: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
h : i ∉ p.support
⊢ ¬coeffIntegerNormalization M p i ≠ 0
tactic: contrapose h
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
h : i ∉ p.support
⊢ ¬coeffIntegerNormalization M p i ≠ 0
state_after: no goals
tactic: rw [Ne, Classical.not_not, coeffIntegerNormalization, dif_neg h]
Theorem: PowerBasis.ofGenMemAdjoin'_gen
File: Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝⁶ : CommRing R
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain R
inst✝³ : Algebra R S
inst✝² : IsDomain S
inst✝¹ : NoZeroSMulDivisors R S
inst✝ : IsIntegrallyClosed R
x : S
B : PowerBasis R S
hint : IsIntegral R x
hx : B.gen ∈ adjoin R {x}
⊢ (B.ofGenMemAdjoin' hint hx).gen = x
state_after: no goals
tactic: simp [PowerBasis.ofGenMemAdjoin']
Theorem: Finset.mem_sum_list_ofFn
File: Mathlib/Data/Finset/Pointwise.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s✝ t : Finset α
a✝ : α
m n : ℕ
a : α
s : Fin n → Finset α
⊢ a ∈ (List.ofFn s).prod ↔ ∃ f, (List.ofFn fun i => ↑(f i)).prod = a
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s✝ t : Finset α
a✝ : α
m n : ℕ
a : α
s : Fin n → Finset α
⊢ (∃ f, (List.ofFn fun i => ↑(f i)).prod = a) ↔ ∃ f, (List.ofFn fun i => ↑(f i)).prod = a
tactic: rw [← mem_coe, coe_list_prod, List.map_ofFn, Set.mem_prod_list_ofFn]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s✝ t : Finset α
a✝ : α
m n : ℕ
a : α
s : Fin n → Finset α
⊢ (∃ f, (List.ofFn fun i => ↑(f i)).prod = a) ↔ ∃ f, (List.ofFn fun i => ↑(f i)).prod = a
state_after: no goals
tactic: rfl
Theorem: Turing.ToPartrec.Code.exists_code.comp
File: Mathlib/Computability/TMToPartrec.lean

Proof steps:
state_before: m n : ℕ
f : Vector ℕ n →. ℕ
g : Fin n → Vector ℕ m →. ℕ
hf : ∃ c, ∀ (v : Vector ℕ n), c.eval ↑v = pure <$> f v
hg : ∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> ((Vector.mOfFn fun i => g i v) >>= f)
state_after: case intro
m n : ℕ
f : Vector ℕ n →. ℕ
g : Fin n → Vector ℕ m →. ℕ
hf : ∃ c, ∀ (v : Vector ℕ n), c.eval ↑v = pure <$> f v
hg✝ : ∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
cg : Code
hg : ∀ (v : Vector ℕ m), cg.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> ((Vector.mOfFn fun i => g i v) >>= f)

m n : ℕ
f : Vector ℕ n →. ℕ
g : Fin n → Vector ℕ m →. ℕ
hf : ∃ c, ∀ (v : Vector ℕ n), c.eval ↑v = pure <$> f v
hg : ∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
tactic: rsuffices ⟨cg, hg⟩ :
    ∃ c : Code, ∀ v : Vector ℕ m, c.eval v.1 = Subtype.val <$> Vector.mOfFn fun i => g i v
state_before: m n : ℕ
f : Vector ℕ n →. ℕ
g : Fin n → Vector ℕ m →. ℕ
hf : ∃ c, ∀ (v : Vector ℕ n), c.eval ↑v = pure <$> f v
hg : ∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
state_after: m n : ℕ
g : Fin n → Vector ℕ m →. ℕ
hg : ∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
tactic: clear hf f
state_before: m n : ℕ
g : Fin n → Vector ℕ m →. ℕ
hg : ∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
state_after: case zero
m : ℕ
g : Fin 0 → Vector ℕ m →. ℕ
hg : ∀ (i : Fin 0), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v

case succ
m n : ℕ
IH :
  ∀ {g : Fin n → Vector ℕ m →. ℕ},
    (∀ (i : Fin n), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v) →
      ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
g : Fin (n + 1) → Vector ℕ m →. ℕ
hg : ∀ (i : Fin (n + 1)), ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = pure <$> g i v
⊢ ∃ c, ∀ (v : Vector ℕ m), c.eval ↑v = Subtype.val <$> Vector.mOfFn fun i => g i v
tactic: induction' n with n IH
Theorem: Multiset.sum_toEnumFinset
File: Mathlib/Data/Multiset/Fintype.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : m.ToType, f x.fst ↑x.snd
state_after: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : { x // x ∈ m.toEnumFinset }, f (↑x).1 (↑x).2

α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∀ (x : m.ToType), f x.fst ↑x.snd = f (↑(m.coeEquiv x)).1 (↑(m.coeEquiv x)).2
tactic: rw [Fintype.prod_equiv m.coeEquiv (fun x ↦ f x x.2) fun x ↦ f x.1.1 x.1.2]
Theorem: sSup_eq_iSup'
File: Mathlib/Order/CompleteLattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f g : ι → α
s : Set α
⊢ sSup s = ⨆ a, ↑a
state_after: no goals
tactic: rw [iSup, Subtype.range_coe]
Theorem: QPF.id_map
File: Mathlib/Data/QPF/Univariate/Basic.lean

Proof steps:
state_before: F : Type u → Type u
q : QPF F
α : Type u
x : F α
⊢ id <$> x = x
state_after: F : Type u → Type u
q : QPF F
α : Type u
x : F α
⊢ id <$> abs (repr x) = abs (repr x)
tactic: rw [← abs_repr x]
state_before: F : Type u → Type u
q : QPF F
α : Type u
x : F α
⊢ id <$> abs (repr x) = abs (repr x)
state_after: case mk
F : Type u → Type u
q : QPF F
α : Type u
x : F α
a : (P F).A
f : (P F).B a → α
⊢ id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩
tactic: cases' repr x with a f
state_before: case mk
F : Type u → Type u
q : QPF F
α : Type u
x : F α
a : (P F).A
f : (P F).B a → α
⊢ id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩
state_after: case mk
F : Type u → Type u
q : QPF F
α : Type u
x : F α
a : (P F).A
f : (P F).B a → α
⊢ abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩
tactic: rw [← abs_map]
state_before: case mk
F : Type u → Type u
q : QPF F
α : Type u
x : F α
a : (P F).A
f : (P F).B a → α
⊢ abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩
state_after: no goals
tactic: rfl
Theorem: WeierstrassCurve.Affine.natDegree_polynomial
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ W.polynomial.natDegree = 2
state_after: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ { a := 0, b := 1, c := { a := 0, b := 0, c := W.a₁, d := W.a₃ }.toPoly,
          d := { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }.toPoly }.toPoly.natDegree =
    2
tactic: rw [polynomial_eq]
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ { a := 0, b := 1, c := { a := 0, b := 0, c := W.a₁, d := W.a₃ }.toPoly,
          d := { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }.toPoly }.toPoly.natDegree =
    2
state_after: no goals
tactic: exact Cubic.natDegree_of_b_ne_zero' one_ne_zero
Theorem: pow_gcd_eq_one
File: Mathlib/Data/Int/GCD.lean

Proof steps:
state_before: M : Type u_1
inst✝ : Monoid M
x : M
m n : ℕ
hm : x ^ m = 1
hn : x ^ n = 1
⊢ x ^ m.gcd n = 1
state_after: case zero
M : Type u_1
inst✝ : Monoid M
x : M
n : ℕ
hn : x ^ n = 1
hm : x ^ 0 = 1
⊢ x ^ Nat.gcd 0 n = 1

case succ
M : Type u_1
inst✝ : Monoid M
x : M
n : ℕ
hn : x ^ n = 1
m : ℕ
hm : x ^ (m + 1) = 1
⊢ x ^ (m + 1).gcd n = 1
tactic: rcases m with (rfl | m)
state_before: case succ
M : Type u_1
inst✝ : Monoid M
x : M
n : ℕ
hn : x ^ n = 1
m : ℕ
hm : x ^ (m + 1) = 1
⊢ x ^ (m + 1).gcd n = 1
state_after: case succ.intro
M : Type u_1
inst✝ : Monoid M
n m : ℕ
y : Mˣ
hn : ↑y ^ n = 1
hm : ↑y ^ (m + 1) = 1
⊢ ↑y ^ (m + 1).gcd n = 1
tactic: obtain ⟨y, rfl⟩ := isUnit_ofPowEqOne hm m.succ_ne_zero
state_before: case succ.intro
M : Type u_1
inst✝ : Monoid M
n m : ℕ
y : Mˣ
hn : ↑y ^ n = 1
hm : ↑y ^ (m + 1) = 1
⊢ ↑y ^ (m + 1).gcd n = 1
state_after: case succ.intro
M : Type u_1
inst✝ : Monoid M
n m : ℕ
y : Mˣ
hn : y ^ ↑n = 1
hm : y ^ ↑(m + 1) = 1
⊢ y ^ ↑((m + 1).gcd n) = 1
tactic: rw [← Units.val_pow_eq_pow_val, ← Units.val_one (α := M), ← zpow_natCast, ← Units.ext_iff] at *
state_before: case succ.intro
M : Type u_1
inst✝ : Monoid M
n m : ℕ
y : Mˣ
hn : y ^ ↑n = 1
hm : y ^ ↑(m + 1) = 1
⊢ y ^ ↑((m + 1).gcd n) = 1
state_after: no goals
tactic: rw [Nat.gcd_eq_gcd_ab, zpow_add, zpow_mul, zpow_mul, hn, hm, one_zpow, one_zpow, one_mul]
Theorem: Set.prod_diff_prod
File: Mathlib/Data/Set/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
⊢ s ×ˢ t \ s₁ ×ˢ t₁ = s ×ˢ (t \ t₁) ∪ (s \ s₁) ×ˢ t
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α × β
⊢ x ∈ s ×ˢ t \ s₁ ×ˢ t₁ ↔ x ∈ s ×ˢ (t \ t₁) ∪ (s \ s₁) ×ˢ t
tactic: ext x
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α × β
⊢ x ∈ s ×ˢ t \ s₁ ×ˢ t₁ ↔ x ∈ s ×ˢ (t \ t₁) ∪ (s \ s₁) ×ˢ t
state_after: no goals
tactic: by_cases h₁ : x.1 ∈ s₁ <;> by_cases h₂ : x.2 ∈ t₁ <;> simp [*]