ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Cardinal.sum_add_distrib
File: Mathlib/SetTheory/Cardinal/Basic.lean

Proof steps:
state_before: α β : Type u
ι : Type u_1
f g : ι → Cardinal.{u_2}
⊢ sum (f + g) = sum f + sum g
state_after: α β : Type u
ι : Type u_1
f g : ι → Cardinal.{u_2}
this :
  #((i : ι) × ((Quotient.out ∘ f) i ⊕ (Quotient.out ∘ g) i)) =
    #((i : ι) × (Quotient.out ∘ f) i ⊕ (i : ι) × (Quotient.out ∘ g) i)
⊢ sum (f + g) = sum f + sum g
tactic: have := mk_congr (Equiv.sigmaSumDistrib (Quotient.out ∘ f) (Quotient.out ∘ g))
state_before: α β : Type u
ι : Type u_1
f g : ι → Cardinal.{u_2}
this :
  #((i : ι) × ((Quotient.out ∘ f) i ⊕ (Quotient.out ∘ g) i)) =
    #((i : ι) × (Quotient.out ∘ f) i ⊕ (i : ι) × (Quotient.out ∘ g) i)
⊢ sum (f + g) = sum f + sum g
state_after: α β : Type u
ι : Type u_1
f g : ι → Cardinal.{u_2}
this : (sum fun i => f i + g i) = (sum fun i => f i) + sum fun i => g i
⊢ sum (f + g) = sum f + sum g
tactic: simp only [comp_apply, mk_sigma, mk_sum, mk_out, lift_id] at this
state_before: α β : Type u
ι : Type u_1
f g : ι → Cardinal.{u_2}
this : (sum fun i => f i + g i) = (sum fun i => f i) + sum fun i => g i
⊢ sum (f + g) = sum f + sum g
state_after: no goals
tactic: exact this
Theorem: Filter.isTopologicalBasis_Iic_principal
File: Mathlib/Topology/Filter.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
X : Type u_4
Y : Type u_5
⊢ ∀ t₁ ∈ range (Iic ∘ 𝓟), ∀ t₂ ∈ range (Iic ∘ 𝓟), ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ range (Iic ∘ 𝓟), x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂
state_after: case intro.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
X : Type u_4
Y : Type u_5
s t : Set α
l : Filter α
hl : l ∈ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t
⊢ ∃ t₃ ∈ range (Iic ∘ 𝓟), l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t
tactic: rintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl
state_before: case intro.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
X : Type u_4
Y : Type u_5
s t : Set α
l : Filter α
hl : l ∈ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t
⊢ ∃ t₃ ∈ range (Iic ∘ 𝓟), l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t
state_after: no goals
tactic: exact ⟨Iic (𝓟 s) ∩ Iic (𝓟 t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩
Theorem: Complex.tan_ofReal_im
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x✝ y : ℂ
x : ℝ
⊢ (tan ↑x).im = 0
state_after: no goals
tactic: rw [← ofReal_tan_ofReal_re, ofReal_im]
Theorem: FiniteDimensional.exists_relation_sum_zero_pos_coefficient_of_finrank_succ_lt_card
File: Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean

Proof steps:
state_before: K : Type u
V : Type v
inst✝⁸ : DivisionRing K
inst✝⁷ : AddCommGroup V
inst✝⁶ : Module K V
V₂ : Type v'
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module K V₂
L : Type u_1
inst✝³ : LinearOrderedField L
W : Type v
inst✝² : AddCommGroup W
inst✝¹ : Module L W
inst✝ : FiniteDimensional L W
t : Finset W
h : finrank L W + 1 < t.card
⊢ ∃ f, ∑ e ∈ t, f e • e = 0 ∧ ∑ e ∈ t, f e = 0 ∧ ∃ x ∈ t, 0 < f x
state_after: case intro.intro.intro
K : Type u
V : Type v
inst✝⁸ : DivisionRing K
inst✝⁷ : AddCommGroup V
inst✝⁶ : Module K V
V₂ : Type v'
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module K V₂
L : Type u_1
inst✝³ : LinearOrderedField L
W : Type v
inst✝² : AddCommGroup W
inst✝¹ : Module L W
inst✝ : FiniteDimensional L W
t : Finset W
h : finrank L W + 1 < t.card
f : W → L
sum : ∑ e ∈ t, f e • e = 0
total : ∑ e ∈ t, f e = 0
nonzero : ∃ x ∈ t, f x ≠ 0
⊢ ∃ f, ∑ e ∈ t, f e • e = 0 ∧ ∑ e ∈ t, f e = 0 ∧ ∃ x ∈ t, 0 < f x
tactic: obtain ⟨f, sum, total, nonzero⟩ :=
    Module.exists_nontrivial_relation_sum_zero_of_finrank_succ_lt_card h
state_before: case intro.intro.intro
K : Type u
V : Type v
inst✝⁸ : DivisionRing K
inst✝⁷ : AddCommGroup V
inst✝⁶ : Module K V
V₂ : Type v'
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module K V₂
L : Type u_1
inst✝³ : LinearOrderedField L
W : Type v
inst✝² : AddCommGroup W
inst✝¹ : Module L W
inst✝ : FiniteDimensional L W
t : Finset W
h : finrank L W + 1 < t.card
f : W → L
sum : ∑ e ∈ t, f e • e = 0
total : ∑ e ∈ t, f e = 0
nonzero : ∃ x ∈ t, f x ≠ 0
⊢ ∃ f, ∑ e ∈ t, f e • e = 0 ∧ ∑ e ∈ t, f e = 0 ∧ ∃ x ∈ t, 0 < f x
state_after: no goals
tactic: exact ⟨f, sum, total, exists_pos_of_sum_zero_of_exists_nonzero f total nonzero⟩
Theorem: Finset.disjoint_box_succ_prod
File: Mathlib/Order/Interval/Finset/Box.lean

Proof steps:
state_before: α : Type u_1
inst✝² : OrderedRing α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
n✝ n : ℕ
⊢ Disjoint (box (n + 1)) (Icc (-↑n) ↑n)
state_after: α : Type u_1
inst✝² : OrderedRing α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
n✝ n : ℕ
⊢ Disjoint (Icc (-↑n.succ) ↑n.succ \ Icc (-↑n) ↑n) (Icc (-↑n) ↑n)
tactic: rw [box_succ_eq_sdiff]
state_before: α : Type u_1
inst✝² : OrderedRing α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
n✝ n : ℕ
⊢ Disjoint (Icc (-↑n.succ) ↑n.succ \ Icc (-↑n) ↑n) (Icc (-↑n) ↑n)
state_after: no goals
tactic: exact disjoint_sdiff_self_left
Theorem: Matrix.zero_zpow_eq
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

Proof steps:
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℤ
⊢ 0 ^ n = if n = 0 then 1 else 0
state_after: case pos
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℤ
h : n = 0
⊢ 0 ^ n = 1

case neg
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℤ
h : ¬n = 0
⊢ 0 ^ n = 0
tactic: split_ifs with h
Theorem: IsPGroup.nonempty_fixed_point_of_prime_not_dvd_card
File: Mathlib/GroupTheory/PGroup.lean

Proof steps:
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ : Finite α
hpα : ¬p ∣ Nat.card α
this : Finite α
⊢ Nonempty ↑(fixedPoints G α)
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ : Finite α
hpα : ¬p ∣ Nat.card α
this : Finite α
⊢ Nat.card ↑(fixedPoints G α) ≠ 0
tactic: rw [← Finite.card_pos_iff, pos_iff_ne_zero]
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ : Finite α
hpα : ¬p ∣ Nat.card α
this : Finite α
⊢ Nat.card ↑(fixedPoints G α) ≠ 0
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ this : Finite α
hpα : Nat.card ↑(fixedPoints G α) = 0
⊢ p ∣ Nat.card α
tactic: contrapose! hpα
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ this : Finite α
hpα : Nat.card ↑(fixedPoints G α) = 0
⊢ p ∣ Nat.card α
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ this : Finite α
hpα : Nat.card ↑(fixedPoints G α) = 0
⊢ Nat.card α ≡ Nat.card ↑(fixedPoints G α) [MOD p]
tactic: rw [← Nat.modEq_zero_iff_dvd, ← hpα]
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
inst✝ this : Finite α
hpα : Nat.card ↑(fixedPoints G α) = 0
⊢ Nat.card α ≡ Nat.card ↑(fixedPoints G α) [MOD p]
state_after: no goals
tactic: exact hG.card_modEq_card_fixedPoints α
Theorem: MeasureTheory.OuterMeasure.isCaratheodory_compl
File: Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean

Proof steps:
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
⊢ m.IsCaratheodory s₁ → m.IsCaratheodory s₁ᶜ
state_after: no goals
tactic: simp [IsCaratheodory, diff_eq, add_comm]
Theorem: LieModule.Weight.weightSpaceOf_ne_bot
File: Mathlib/Algebra/Lie/Weights/Basic.lean

Proof steps:
state_before: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
⊢ weightSpaceOf M (χ x) x ≠ ⊥
state_after: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
this : ⨅ x, weightSpaceOf M (χ x) x ≠ ⊥
⊢ weightSpaceOf M (χ x) x ≠ ⊥
tactic: have : ⨅ x, weightSpaceOf M (χ x) x ≠ ⊥ := χ.weightSpace_ne_bot
state_before: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
this : ⨅ x, weightSpaceOf M (χ x) x ≠ ⊥
⊢ weightSpaceOf M (χ x) x ≠ ⊥
state_after: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
this : weightSpaceOf M (χ x) x = ⊥
⊢ ⨅ x, weightSpaceOf M (χ x) x = ⊥
tactic: contrapose! this
state_before: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
this : weightSpaceOf M (χ x) x = ⊥
⊢ ⨅ x, weightSpaceOf M (χ x) x = ⊥
state_after: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
this : weightSpaceOf M (χ x) x = ⊥
⊢ ⨅ x, weightSpaceOf M (χ x) x ≤ ⊥
tactic: rw [eq_bot_iff]
state_before: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
x : L
this : weightSpaceOf M (χ x) x = ⊥
⊢ ⨅ x, weightSpaceOf M (χ x) x ≤ ⊥
state_after: no goals
tactic: exact le_of_le_of_eq (iInf_le _ _) this
Theorem: OrderIso.preimage_Iio
File: Mathlib/Order/Interval/Set/OrderIso.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
b : β
⊢ ⇑e ⁻¹' Iio b = Iio (e.symm b)
state_after: case h
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
b : β
x : α
⊢ x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)
tactic: ext x
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
b : β
x : α
⊢ x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)
state_after: no goals
tactic: simp [← e.lt_iff_lt]
Theorem: SeparatingDual.exists_eq_one
File: Mathlib/Analysis/NormedSpace/HahnBanach/SeparatingDual.lean

Proof steps:
state_before: R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x : V
hx : x ≠ 0
⊢ ∃ f, f x = 1
state_after: case intro
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x : V
hx : x ≠ 0
f : V →L[R] R
hf : f x ≠ 0
⊢ ∃ f, f x = 1
tactic: rcases exists_ne_zero (R := R) hx with ⟨f, hf⟩
state_before: case intro
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x : V
hx : x ≠ 0
f : V →L[R] R
hf : f x ≠ 0
⊢ ∃ f, f x = 1
state_after: no goals
tactic: exact ⟨(f x)⁻¹ • f, inv_mul_cancel hf⟩
Theorem: Matroid.basis_self_iff_indep
File: Mathlib/Data/Matroid/Basic.lean

Proof steps:
state_before: α : Type u_1
M : Matroid α
B I J X Y : Set α
e : α
⊢ M.Basis I I ↔ M.Indep I
state_after: α : Type u_1
M : Matroid α
B I J X Y : Set α
e : α
⊢ M.Indep I → (∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ I → I = J) ∧ I ⊆ M.E
tactic: rw [basis_iff', and_iff_right rfl.subset, and_assoc, and_iff_left_iff_imp]
state_before: α : Type u_1
M : Matroid α
B I J X Y : Set α
e : α
⊢ M.Indep I → (∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ I → I = J) ∧ I ⊆ M.E
state_after: no goals
tactic: exact fun hi ↦ ⟨fun _ _ ↦ subset_antisymm, hi.subset_ground⟩
Theorem: Filter.frequently_iff_forall_eventually_exists_and
File: Mathlib/Order/Filter/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
H : ∀ {q : α → Prop}, (∀ᶠ (x : α) in f, q x) → ∃ x, p x ∧ q x
hp : ∀ᶠ (x : α) in f, ¬(fun x => p x) x
⊢ False
state_after: no goals
tactic: simpa only [and_not_self_iff, exists_false] using H hp
Theorem: Pretrivialization.symm_trans_target_eq
File: Mathlib/Topology/FiberBundle/Trivialization.lean

Proof steps:
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e✝ : Pretrivialization F proj
x : Z
e e' : Pretrivialization F proj
⊢ (e.symm.trans e'.toPartialEquiv).target = (e.baseSet ∩ e'.baseSet) ×ˢ univ
state_after: no goals
tactic: rw [← PartialEquiv.symm_source, symm_trans_symm, symm_trans_source_eq, inter_comm]
Theorem: wittStructureRat_rec
File: Mathlib/RingTheory/WittVector/StructurePolynomial.lean

Proof steps:
state_before: p : ℕ
R : Type u_1
idx : Type u_2
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ wittStructureRat p Φ n =
    C (1 / ↑p ^ n) *
      ((bind₁ fun b => (rename fun i => (b, i)) (W_ ℚ n)) Φ -
        ∑ i ∈ Finset.range n, C (↑p ^ i) * wittStructureRat p Φ i ^ p ^ (n - i))
state_after: p : ℕ
R : Type u_1
idx : Type u_2
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ wittStructureRat p Φ n = C (1 / ↑p ^ n) * (wittStructureRat p Φ n * C (↑p ^ n))
tactic: calc
    wittStructureRat p Φ n = C (1 / (p : ℚ) ^ n) * (wittStructureRat p Φ n * C ((p : ℚ) ^ n)) := ?_
    _ = _ := by rw [wittStructureRat_rec_aux]
state_before: p : ℕ
R : Type u_1
idx : Type u_2
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ wittStructureRat p Φ n = C (1 / ↑p ^ n) * (wittStructureRat p Φ n * C (↑p ^ n))
state_after: case h
p : ℕ
R : Type u_1
idx : Type u_2
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ ↑p ^ n ≠ 0
tactic: rw [mul_left_comm, ← C_mul, div_mul_cancel₀, C_1, mul_one]
state_before: case h
p : ℕ
R : Type u_1
idx : Type u_2
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ ↑p ^ n ≠ 0
state_after: no goals
tactic: exact pow_ne_zero _ (Nat.cast_ne_zero.2 hp.1.ne_zero)
Theorem: SymmetricRel.inter
File: Mathlib/Topology/UniformSpace/Basic.lean

Proof steps:
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
U V : Set (α × α)
hU : SymmetricRel U
hV : SymmetricRel V
⊢ SymmetricRel (U ∩ V)
state_after: no goals
tactic: rw [SymmetricRel, preimage_inter, hU.eq, hV.eq]
Theorem: PNat.Coprime.factor_eq_gcd_left
File: Mathlib/Data/PNat/Prime.lean

Proof steps:
state_before: a b m n : ℕ+
cop : m.Coprime n
am : a ∣ m
bn : b ∣ n
⊢ a = (a * b).gcd m
state_after: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ a = (a * b).gcd m
tactic: rw [gcd_eq_left_iff_dvd] at am
state_before: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ a = (a * b).gcd m
state_after: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ a.gcd m = (a * b).gcd m
tactic: conv_lhs => rw [← am]
state_before: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ a.gcd m = (a * b).gcd m
state_after: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ (a * b).gcd m = a.gcd m
tactic: rw [eq_comm]
state_before: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ (a * b).gcd m = a.gcd m
state_after: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ b.Coprime m
tactic: apply Coprime.gcd_mul_right_cancel a
state_before: a b m n : ℕ+
cop : m.Coprime n
am : a.gcd m = a
bn : b ∣ n
⊢ b.Coprime m
state_after: no goals
tactic: apply Coprime.coprime_dvd_left bn cop.symm
Theorem: measurable_piEquivPiSubtypeProd_symm
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
π : δ → Type u_6
inst✝³ : MeasurableSpace α
inst✝² : (a : δ) → MeasurableSpace (π a)
inst✝¹ : MeasurableSpace γ
p : δ → Prop
inst✝ : DecidablePred p
⊢ Measurable ⇑(piEquivPiSubtypeProd p π).symm
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
π : δ → Type u_6
inst✝³ : MeasurableSpace α
inst✝² : (a : δ) → MeasurableSpace (π a)
inst✝¹ : MeasurableSpace γ
p : δ → Prop
inst✝ : DecidablePred p
j : δ
⊢ Measurable fun x => (piEquivPiSubtypeProd p π).symm x j
tactic: refine measurable_pi_iff.2 fun j => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
π : δ → Type u_6
inst✝³ : MeasurableSpace α
inst✝² : (a : δ) → MeasurableSpace (π a)
inst✝¹ : MeasurableSpace γ
p : δ → Prop
inst✝ : DecidablePred p
j : δ
⊢ Measurable fun x => (piEquivPiSubtypeProd p π).symm x j
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
π : δ → Type u_6
inst✝³ : MeasurableSpace α
inst✝² : (a : δ) → MeasurableSpace (π a)
inst✝¹ : MeasurableSpace γ
p : δ → Prop
inst✝ : DecidablePred p
j : δ
hj : p j
⊢ Measurable fun x => (piEquivPiSubtypeProd p π).symm x j

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
π : δ → Type u_6
inst✝³ : MeasurableSpace α
inst✝² : (a : δ) → MeasurableSpace (π a)
inst✝¹ : MeasurableSpace γ
p : δ → Prop
inst✝ : DecidablePred p
j : δ
hj : ¬p j
⊢ Measurable fun x => (piEquivPiSubtypeProd p π).symm x j
tactic: by_cases hj : p j
Theorem: ProbabilityTheory.ofReal_cdf
File: Mathlib/Probability/Cdf.lean

Proof steps:
state_before: μ : Measure ℝ
inst✝ : IsProbabilityMeasure μ
x : ℝ
⊢ ENNReal.ofReal (↑(cdf μ) x) = μ (Iic x)
state_after: μ : Measure ℝ
inst✝ : IsProbabilityMeasure μ
x : ℝ
this : IsFiniteMeasure ((Measure.dirac ()).prod μ)
⊢ ENNReal.ofReal (↑(cdf μ) x) = μ (Iic x)
tactic: have := IsProbabilityMeasure.toIsFiniteMeasure (Measure.prod (Measure.dirac ()) μ)
state_before: μ : Measure ℝ
inst✝ : IsProbabilityMeasure μ
x : ℝ
this : IsFiniteMeasure ((Measure.dirac ()).prod μ)
⊢ ENNReal.ofReal (↑(cdf μ) x) = μ (Iic x)
state_after: μ : Measure ℝ
inst✝ : IsProbabilityMeasure μ
x : ℝ
this : IsFiniteMeasure ((Measure.dirac ()).prod μ)
h :
  ∫⁻ (a : Unit), ENNReal.ofReal (↑(condCDF ((Measure.dirac ()).prod μ) a) x) ∂((Measure.dirac ()).prod μ).fst =
    ((Measure.dirac ()).prod μ) (univ ×ˢ Iic x)
⊢ ENNReal.ofReal (↑(cdf μ) x) = μ (Iic x)
tactic: have h := lintegral_condCDF ((Measure.dirac Unit.unit).prod μ) x
state_before: μ : Measure ℝ
inst✝ : IsProbabilityMeasure μ
x : ℝ
this : IsFiniteMeasure ((Measure.dirac ()).prod μ)
h :
  ∫⁻ (a : Unit), ENNReal.ofReal (↑(condCDF ((Measure.dirac ()).prod μ) a) x) ∂((Measure.dirac ()).prod μ).fst =
    ((Measure.dirac ()).prod μ) (univ ×ˢ Iic x)
⊢ ENNReal.ofReal (↑(cdf μ) x) = μ (Iic x)
state_after: no goals
tactic: simpa only [MeasureTheory.Measure.fst_prod, Measure.prod_prod, measure_univ, one_mul,
    lintegral_dirac] using h
Theorem: Set.image2_iUnion_left
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β → γ
s✝ : Set α
t✝ : Set β
s : ι → Set α
t : Set β
⊢ image2 f (⋃ i, s i) t = ⋃ i, image2 f (s i) t
state_after: no goals
tactic: simp only [← image_prod, iUnion_prod_const, image_iUnion]
Theorem: lt_add_iff_pos_right
File: Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : MulOneClass α
inst✝² : LT α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b : α
⊢ a < a * b ↔ a * 1 < a * b
state_after: no goals
tactic: rw [mul_one]
Theorem: List.stronglyMeasurable_prod
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l : List (α → M)
hl : ∀ f ∈ l, StronglyMeasurable f
⊢ StronglyMeasurable fun x => (List.map (fun f => f x) l).prod
state_after: no goals
tactic: simpa only [← Pi.list_prod_apply] using l.stronglyMeasurable_prod' hl
Theorem: NumberField.mixedEmbedding.convexBodySum_isBounded
File: Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean

Proof steps:
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
⊢ Bornology.IsBounded (convexBodySum K B)
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hx : x ∈ convexBodySum K B
y : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hy : y ∈ convexBodySum K B
⊢ dist x y ≤ B + B
tactic: refine Metric.isBounded_iff.mpr ⟨B + B, fun x hx y hy => ?_⟩
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hx : x ∈ convexBodySum K B
y : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hy : y ∈ convexBodySum K B
⊢ dist x y ≤ B + B
state_after: case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hx : x ∈ convexBodySum K B
y : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hy : y ∈ convexBodySum K B
⊢ ‖x‖ ≤ B

case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : ℝ
x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hx : x ∈ convexBodySum K B
y : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)
hy : y ∈ convexBodySum K B
⊢ ‖y‖ ≤ B
tactic: refine le_trans (norm_sub_le x y) (add_le_add ?_ ?_)
Theorem: Subalgebra.star_mem_star_iff
File: Mathlib/Algebra/Star/Subalgebra.lean

Proof steps:
state_before: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
S : Subalgebra R A
x : A
⊢ star x ∈ star S ↔ x ∈ S
state_after: no goals
tactic: simp only [mem_star_iff, star_star]
Theorem: HomologicalComplex.d_comp_XIsoOfEq_inv
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

Proof steps:
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
K : HomologicalComplex V c
p₂ p₃ : ι
h : p₃ = p₂
p₁ : ι
⊢ K.d p₁ p₂ ≫ (K.XIsoOfEq h).inv = K.d p₁ p₃
state_after: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
K : HomologicalComplex V c
p₃ p₁ : ι
⊢ K.d p₁ p₃ ≫ (K.XIsoOfEq ⋯).inv = K.d p₁ p₃
tactic: subst h
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
K : HomologicalComplex V c
p₃ p₁ : ι
⊢ K.d p₁ p₃ ≫ (K.XIsoOfEq ⋯).inv = K.d p₁ p₃
state_after: no goals
tactic: simp
Theorem: MeasureTheory.OuterMeasure.mono'
File: Mathlib/MeasureTheory/OuterMeasure/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m✝ m : OuterMeasure α
s₁ s₂ : Set α
h : s₁ ⊆ s₂
⊢ m s₁ ≤ m s₂
state_after: no goals
tactic: gcongr
Theorem: Finset.sum_dite_of_true
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
x✝ : DecidablePred p
h : ∀ i ∈ s, p i
f : (i : α) → p i → β
g : (i : α) → ¬p i → β
⊢ (∏ i ∈ s, if hi : p i then f i hi else g i hi) = ∏ i : { x // x ∈ s }, f ↑i ⋯
state_after: no goals
tactic: refine prod_bij' (fun x hx => ⟨x, hx⟩) (fun x _ ↦ x) ?_ ?_ ?_ ?_ ?_ <;> aesop