tasksource/leandojo huggingface dataset:
Theorem: isCyclic_of_subgroup_isDomain
File: Mathlib/RingTheory/IntegralDomain.lean

tactic: classical
  cases nonempty_fintype G
  apply isCyclic_of_card_pow_eq_one_le
  intro n hn
  exact le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nthRoots n (f 1))
state_before: R : Type u_2
G : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : Group G
inst✝ : Finite G
f : G →* R
hf : Injective ↑f
⊢ IsCyclic G

tactic: cases nonempty_fintype G
state_before: R : Type u_2
G : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : Group G
inst✝ : Finite G
f : G →* R
hf : Injective ↑f
⊢ IsCyclic G

tactic: apply isCyclic_of_card_pow_eq_one_le
state_before: case intro
R : Type u_2
G : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : Group G
inst✝ : Finite G
f : G →* R
hf : Injective ↑f
val✝ : Fintype G
⊢ IsCyclic G

tactic: intro n hn
state_before: case intro.hn
R : Type u_2
G : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : Group G
inst✝ : Finite G
f : G →* R
hf : Injective ↑f
val✝ : Fintype G
⊢ ∀ (n : ℕ), 0 < n → card (filter (fun a => a ^ n = 1) univ) ≤ n

tactic: exact le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nthRoots n (f 1))
state_before: case intro.hn
R : Type u_2
G : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : Group G
inst✝ : Finite G
f : G →* R
hf : Injective ↑f
val✝ : Fintype G
n : ℕ
hn : 0 < n
⊢ card (filter (fun a => a ^ n = 1) univ) ≤ n
Theorem: add_sq'
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rw [add_sq, add_assoc, add_comm _ (b ^ 2), add_assoc]
state_before: R : Type u_1
S : Type ?u.88727
M : Type ?u.88730
inst✝ : CommSemiring R
a b : R
⊢ (a + b) ^ 2 = a ^ 2 + b ^ 2 + 2 * a * b
Theorem: Finset.card_le_one
File: Mathlib/Data/Finset/Card.lean

tactic: obtain rfl | ⟨x, hx⟩ := s.eq_empty_or_nonempty
state_before: α : Type u_1
β : Type ?u.48906
s t : Finset α
f : α → β
n : ℕ
⊢ card s ≤ 1 ↔ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a = b

tactic: refine' (Nat.succ_le_of_lt (card_pos.2 ⟨x, hx⟩)).le_iff_eq.trans (card_eq_one.trans ⟨_, _⟩)
state_before: case inr.intro
α : Type u_1
β : Type ?u.48906
s t : Finset α
f : α → β
n : ℕ
x : α
hx : x ∈ s
⊢ card s ≤ 1 ↔ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a = b

tactic: simp
state_before: case inl
α : Type u_1
β : Type ?u.48906
t : Finset α
f : α → β
n : ℕ
⊢ card ∅ ≤ 1 ↔ ∀ (a : α), a ∈ ∅ → ∀ (b : α), b ∈ ∅ → a = b

tactic: rintro ⟨y, rfl⟩
state_before: case inr.intro.refine'_1
α : Type u_1
β : Type ?u.48906
s t : Finset α
f : α → β
n : ℕ
x : α
hx : x ∈ s
⊢ (∃ a, s = {a}) → ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a = b

tactic: simp
state_before: case inr.intro.refine'_1.intro
α : Type u_1
β : Type ?u.48906
t : Finset α
f : α → β
n : ℕ
x y : α
hx : x ∈ {y}
⊢ ∀ (a : α), a ∈ {y} → ∀ (b : α), b ∈ {y} → a = b

tactic: exact fun h => ⟨x, eq_singleton_iff_unique_mem.2 ⟨hx, fun y hy => h _ hy _ hx⟩⟩
state_before: case inr.intro.refine'_2
α : Type u_1
β : Type ?u.48906
s t : Finset α
f : α → β
n : ℕ
x : α
hx : x ∈ s
⊢ (∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a = b) → ∃ a, s = {a}
Theorem: nhdsSet_empty
File: Mathlib/Topology/NhdsSet.lean

tactic: rw [isOpen_empty.nhdsSet_eq, principal_empty]
state_before: α : Type u_1
β : Type ?u.12108
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t s₁ s₂ t₁ t₂ : Set α
x : α
⊢ 𝓝ˢ ∅ = ⊥
Theorem: Polynomial.div_tendsto_atTop_of_degree_gt'
File: Mathlib/Analysis/SpecialFunctions/Polynomials.lean

tactic: have hQ : Q ≠ 0 := fun h => by
  simp only [h, div_zero, leadingCoeff_zero] at hpos
  exact hpos.false
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree Q < degree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
⊢ Tendsto (fun x => eval x P / eval x Q) atTop atTop

tactic: rw [← natDegree_lt_natDegree_iff hQ] at hdeg
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree Q < degree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
hQ : Q ≠ 0
⊢ Tendsto (fun x => eval x P / eval x Q) atTop atTop

tactic: refine' (isEquivalent_atTop_div P Q).symm.tendsto_atTop _
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : natDegree Q < natDegree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
hQ : Q ≠ 0
⊢ Tendsto (fun x => eval x P / eval x Q) atTop atTop

tactic: apply Tendsto.const_mul_atTop hpos
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : natDegree Q < natDegree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
hQ : Q ≠ 0
⊢ Tendsto (fun x => leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))) atTop atTop

tactic: apply tendsto_zpow_atTop_atTop
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : natDegree Q < natDegree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
hQ : Q ≠ 0
⊢ Tendsto (fun x => x ^ (↑(natDegree P) - ↑(natDegree Q))) atTop atTop

tactic: linarith
state_before: case hn
𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : natDegree Q < natDegree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
hQ : Q ≠ 0
⊢ 0 < ↑(natDegree P) - ↑(natDegree Q)

tactic: simp only [h, div_zero, leadingCoeff_zero] at hpos
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree Q < degree P
hpos : 0 < leadingCoeff P / leadingCoeff Q
h : Q = 0
⊢ False

tactic: exact hpos.false
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree Q < degree P
h : Q = 0
hpos : 0 < 0
⊢ False
Theorem: PGame.neg_le_lf_neg_iff
File: Mathlib/SetTheory/Game/PGame.lean

tactic: simp_rw [neg_def, mk_le_mk, mk_lf_mk, ← neg_def]
state_before: xl xr : Type u
xL : xl → PGame
xR : xr → PGame
yl yr : Type u
yL : yl → PGame
yR : yr → PGame
⊢ (-mk yl yr yL yR ≤ -mk xl xr xL xR ↔ mk xl xr xL xR ≤ mk yl yr yL yR) ∧
    (-mk yl yr yL yR ⧏ -mk xl xr xL xR ↔ mk xl xr xL xR ⧏ mk yl yr yL yR)

tactic: constructor
state_before: xl xr : Type u
xL : xl → PGame
xR : xr → PGame
yl yr : Type u
yL : yl → PGame
yR : yr → PGame
⊢ (((∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ∧
        ∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ↔
      (∀ (i : xl), xL i ⧏ mk yl yr yL yR) ∧ ∀ (j : yr), mk xl xr xL xR ⧏ yR j) ∧
    (((∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ∨ ∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ↔
      (∃ i, mk xl xr xL xR ≤ yL i) ∨ ∃ j, xR j ≤ mk yl yr yL yR)

tactic: rw [and_comm]
state_before: case left
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
yl yr : Type u
yL : yl → PGame
yR : yr → PGame
⊢ ((∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ∧
      ∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ↔
    (∀ (i : xl), xL i ⧏ mk yl yr yL yR) ∧ ∀ (j : yr), mk xl xr xL xR ⧏ yR j

tactic: apply and_congr <;> exact forall_congr' fun _ => neg_le_lf_neg_iff.2
state_before: case left
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
yl yr : Type u
yL : yl → PGame
yR : yr → PGame
⊢ ((∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ∧
      ∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ↔
    (∀ (i : xl), xL i ⧏ mk yl yr yL yR) ∧ ∀ (j : yr), mk xl xr xL xR ⧏ yR j

tactic: rw [or_comm]
state_before: case right
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
yl yr : Type u
yL : yl → PGame
yR : yr → PGame
⊢ ((∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ∨ ∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ↔
    (∃ i, mk xl xr xL xR ≤ yL i) ∨ ∃ j, xR j ≤ mk yl yr yL yR

tactic: apply or_congr <;> exact exists_congr fun _ => neg_le_lf_neg_iff.1
state_before: case right
xl xr : Type u
xL : xl → PGame
xR : xr → PGame
yl yr : Type u
yL : yl → PGame
yR : yr → PGame
⊢ ((∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ∨ ∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ↔
    (∃ i, mk xl xr xL xR ≤ yL i) ∨ ∃ j, xR j ≤ mk yl yr yL yR
Theorem: multiplicity.pow_multiplicity_dvd
File: Mathlib/RingTheory/Multiplicity.lean

tactic: rw [PartENat.natCast_get]
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ ↑(Part.get (multiplicity a b) h) ≤ multiplicity a b
Theorem: smul_inv_le_iff_of_neg
File: Mathlib/Algebra/Order/Module.lean

tactic: rw [← smul_le_smul_iff_of_neg h, smul_inv_smul₀ h.ne]
state_before: k : Type u_1
M : Type u_2
N : Type ?u.99475
inst✝³ : LinearOrderedField k
inst✝² : OrderedAddCommGroup M
inst✝¹ : Module k M
inst✝ : OrderedSMul k M
a b : M
c : k
h : c < 0
⊢ a ≤ c⁻¹ • b ↔ b ≤ c • a
Theorem: List.range_eq_range'
File: Std/Data/List/Lemmas.lean

tactic: rw [Nat.zero_add]
state_before: n : Nat
⊢ range' 0 (0 + n) = range' 0 n
Theorem: Relation.ReflTransGen.symmetric
File: Mathlib/Logic/Relation.lean

tactic: intro x y h
state_before: α : Type u_1
β : Type ?u.16745
γ : Type ?u.16748
δ : Type ?u.16751
r : α → α → Prop
a b c d : α
h : Symmetric r
⊢ Symmetric (ReflTransGen r)

tactic: induction' h with z w _ b c
state_before: α : Type u_1
β : Type ?u.16745
γ : Type ?u.16748
δ : Type ?u.16751
r : α → α → Prop
a b c d : α
h✝ : Symmetric r
x y : α
h : ReflTransGen r x y
⊢ ReflTransGen r y x

tactic: rfl
state_before: case refl
α : Type u_1
β : Type ?u.16745
γ : Type ?u.16748
δ : Type ?u.16751
r : α → α → Prop
a b c d : α
h : Symmetric r
x y : α
⊢ ReflTransGen r x x

tactic: apply Relation.ReflTransGen.head (h b) c
state_before: case tail
α : Type u_1
β : Type ?u.16745
γ : Type ?u.16748
δ : Type ?u.16751
r : α → α → Prop
a b✝ c✝ d : α
h : Symmetric r
x y z w : α
a✝ : ReflTransGen r x z
b : r z w
c : ReflTransGen r z x
⊢ ReflTransGen r w x
Theorem: Matrix.updateColumn_conjTranspose
File: Mathlib/Data/Matrix/Basic.lean

tactic: rw [conjTranspose, conjTranspose, transpose_map, transpose_map, updateColumn_transpose,
  map_updateRow]
state_before: l : Type ?u.1228403
m : Type u_1
n : Type u_2
o : Type ?u.1228412
m' : o → Type ?u.1228417
n' : o → Type ?u.1228422
R : Type ?u.1228425
S : Type ?u.1228428
α : Type v
β : Type w
γ : Type ?u.1228435
M : Matrix m n α
i : m
j : n
b : n → α
c : m → α
inst✝¹ : DecidableEq m
inst✝ : Star α
⊢ updateColumn Mᴴ i (star b) = (updateRow M i b)ᴴ

tactic: rfl
state_before: l : Type ?u.1228403
m : Type u_1
n : Type u_2
o : Type ?u.1228412
m' : o → Type ?u.1228417
n' : o → Type ?u.1228422
R : Type ?u.1228425
S : Type ?u.1228428
α : Type v
β : Type w
γ : Type ?u.1228435
M : Matrix m n α
i : m
j : n
b : n → α
c : m → α
inst✝¹ : DecidableEq m
inst✝ : Star α
⊢ (updateRow (map M star) i (star b))ᵀ = (updateRow (map M star) i (star ∘ b))ᵀ
Theorem: SimpleGraph.reachable_iff_reflTransGen
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: constructor
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
⊢ Reachable G u v ↔ Relation.ReflTransGen G.Adj u v

tactic: rintro ⟨h⟩
state_before: case mp
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
⊢ Reachable G u v → Relation.ReflTransGen G.Adj u v

tactic: induction h with
| nil => rfl
| cons h' _ ih => exact (Relation.ReflTransGen.single h').trans ih
state_before: case mp.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
h : Walk G u v
⊢ Relation.ReflTransGen G.Adj u v

tactic: rfl
state_before: case mp.intro.nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ : V
⊢ Relation.ReflTransGen G.Adj u✝ u✝

tactic: exact (Relation.ReflTransGen.single h').trans ih
state_before: case mp.intro.cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h' : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : Relation.ReflTransGen G.Adj v✝ w✝
⊢ Relation.ReflTransGen G.Adj u✝ w✝

tactic: intro h
state_before: case mpr
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
⊢ Relation.ReflTransGen G.Adj u v → Reachable G u v

tactic: induction h with
| refl => rfl
| tail _ ha hr => exact Reachable.trans hr ⟨Walk.cons ha Walk.nil⟩
state_before: case mpr
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
h : Relation.ReflTransGen G.Adj u v
⊢ Reachable G u v

tactic: rfl
state_before: case mpr.refl
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
⊢ Reachable G u u

tactic: exact Reachable.trans hr ⟨Walk.cons ha Walk.nil⟩
state_before: case mpr.tail
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v b✝ c✝ : V
a✝ : Relation.ReflTransGen G.Adj u b✝
ha : Adj G b✝ c✝
hr : Reachable G u b✝
⊢ Reachable G u c✝
Theorem: LinearIsometryEquiv.piLpCongrLeft_single
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: funext x
state_before: p : ℝ≥0∞
𝕜 : Type u_4
𝕜' : Type ?u.391376
ι : Type u_1
α : ι → Type ?u.391384
β : ι → Type ?u.391389
inst✝¹⁰ : Fintype ι
inst✝⁹ : Fact (1 ≤ p)
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedField 𝕜'
inst✝⁶ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝⁵ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
x y : PiLp p β
x' y' : (i : ι) → β i
i✝ : ι
ι' : Type u_2
inst✝⁴ : Fintype ι'
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
e : ι ≃ ι'
i : ι
v : E
⊢ ↑(LinearIsometryEquiv.piLpCongrLeft p 𝕜 E e) (↑(PiLp.equiv p fun x => E).symm (Pi.single i v)) =
    ↑(PiLp.equiv p fun x => E).symm (Pi.single (↑e i) v)

tactic: simp [LinearIsometryEquiv.piLpCongrLeft_apply, LinearEquiv.piCongrLeft', Equiv.piCongrLeft',
  Pi.single, Function.update, Equiv.symm_apply_eq]
state_before: case h
p : ℝ≥0∞
𝕜 : Type u_4
𝕜' : Type ?u.391376
ι : Type u_1
α : ι → Type ?u.391384
β : ι → Type ?u.391389
inst✝¹⁰ : Fintype ι
inst✝⁹ : Fact (1 ≤ p)
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedField 𝕜'
inst✝⁶ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝⁵ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
x✝ y : PiLp p β
x' y' : (i : ι) → β i
i✝ : ι
ι' : Type u_2
inst✝⁴ : Fintype ι'
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
e : ι ≃ ι'
i : ι
v : E
x : ι'
⊢ ↑(LinearIsometryEquiv.piLpCongrLeft p 𝕜 E e) (↑(PiLp.equiv p fun x => E).symm (Pi.single i v)) x =
    ↑(PiLp.equiv p fun x => E).symm (Pi.single (↑e i) v) x
Theorem: Polynomial.cyclotomic_prime_mul_X_sub_one
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: rw [cyclotomic_prime, geom_sum_mul]
state_before: R : Type u_1
inst✝ : Ring R
p : ℕ
hn : Fact (Nat.Prime p)
⊢ cyclotomic p R * (X - 1) = X ^ p - 1
Theorem: Metric.exists_ball_subset_ball
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [sub_sub_self]
state_before: α : Type u
β : Type v
X : Type ?u.44914
ι : Type ?u.44917
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : y ∈ ball x ε
⊢ dist y x ≤ ε - (ε - dist y x)
Theorem: Multiset.nodup_bind
File: Mathlib/Data/Multiset/Nodup.lean

tactic: simp [this, List.nodup_bind, pairwise_coe_iff_pairwise hd]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.15034
r : α → α → Prop
s✝ t✝ : Multiset α
a : α
s : Multiset α
t : α → Multiset β
h₁ : ∀ (a : α), ∃ l, t a = ↑l
t' : α → List β
h' : ∀ (x : α), t x = ↑(t' x)
this : t = fun a => ↑(t' a)
hd : Symmetric fun a b => List.Disjoint (t' a) (t' b)
⊢ ∀ (a : List α),
    Nodup (bind (Quot.mk Setoid.r a) t) ↔
      (∀ (a_1 : α), a_1 ∈ Quot.mk Setoid.r a → Nodup (t a_1)) ∧
        Pairwise (fun a b => Disjoint (t a) (t b)) (Quot.mk Setoid.r a)
Theorem: FreeCommRing.induction_on
File: Mathlib/RingTheory/FreeCommRing.lean

tactic: convert hm (of a) _ (hb a) ih
state_before: α : Type u
C : FreeCommRing α → Prop
z : FreeCommRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeCommRing α), C x → C (-x)
h1 : C 1
m✝ : Multiplicative (Multiset α)
a : α
m : Multiset α
ih : C (FreeAbelianGroup.of m)
⊢ C (FreeAbelianGroup.of (a ::ₘ m))

tactic: apply of_cons
state_before: case h.e'_1
α : Type u
C : FreeCommRing α → Prop
z : FreeCommRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeCommRing α), C x → C (-x)
h1 : C 1
m✝ : Multiplicative (Multiset α)
a : α
m : Multiset α
ih : C (FreeAbelianGroup.of m)
⊢ FreeAbelianGroup.of (a ::ₘ m) = of a * FreeAbelianGroup.of m
Theorem: CategoryTheory.Abelian.Exact.unop_iff
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: rwa [← f.op_unop, ← g.op_unop, ← Exact.op_iff] at e
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Cᵒᵖ
g : X ⟶ Y
f : Y ⟶ Z
e : Exact f.unop g.unop
⊢ Exact g f

tactic: rw [← Exact.op_iff]
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Cᵒᵖ
g : X ⟶ Y
f : Y ⟶ Z
e : Exact g f
⊢ Exact f.unop g.unop

tactic: exact e
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Cᵒᵖ
g : X ⟶ Y
f : Y ⟶ Z
e : Exact g f
⊢ Exact g.unop.op f.unop.op
Theorem: Real.Wallis.W_eq_integral_sin_pow_div_integral_sin_pow
File: Mathlib/Data/Real/Pi/Wallis.lean

tactic: rw [integral_sin_pow_even, integral_sin_pow_odd, mul_div_mul_comm, ← prod_div_distrib, inv_div]
state_before: k : ℕ
⊢ (π / 2)⁻¹ * W k = (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k + 1)) / ∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)

tactic: simp_rw [div_div_div_comm, div_div_eq_mul_div, mul_div_assoc]
state_before: k : ℕ
⊢ 2 / π * W k = 2 / π * ∏ x in range k, (2 * ↑x + 2) / (2 * ↑x + 3) / ((2 * ↑x + 1) / (2 * ↑x + 2))

tactic: rfl
state_before: k : ℕ
⊢ 2 / π * W k = 2 / π * ∏ x in range k, (2 * ↑x + 2) / (2 * ↑x + 1) * ((2 * ↑x + 2) / (2 * ↑x + 3))
Theorem: MeasureTheory.VectorMeasure.mapRange_id
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.296719
m inst✝⁵ : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
M : Type u_2
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
v : VectorMeasure α M
N : Type ?u.296766
inst✝¹ : AddCommMonoid N
inst✝ : TopologicalSpace N
⊢ mapRange v (AddMonoidHom.id M) (_ : Continuous id) = v

tactic: rfl
state_before: case h
α : Type u_1
β : Type ?u.296719
m inst✝⁵ : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
M : Type u_2
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
v : VectorMeasure α M
N : Type ?u.296766
inst✝¹ : AddCommMonoid N
inst✝ : TopologicalSpace N
i✝ : Set α
a✝ : MeasurableSet i✝
⊢ ↑(mapRange v (AddMonoidHom.id M) (_ : Continuous id)) i✝ = ↑v i✝
Theorem: PseudoMetricSpace.replaceTopology_eq
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: ext
state_before: α : Type u
β : Type v
X : Type ?u.167309
ι : Type ?u.167312
inst✝ : PseudoMetricSpace α
γ : Type u_1
U : TopologicalSpace γ
m : PseudoMetricSpace γ
H : U = UniformSpace.toTopologicalSpace
⊢ replaceTopology m H = m

tactic: rfl
state_before: case h.dist.h.h
α : Type u
β : Type v
X : Type ?u.167309
ι : Type ?u.167312
inst✝ : PseudoMetricSpace α
γ : Type u_1
U : TopologicalSpace γ
m : PseudoMetricSpace γ
H : U = UniformSpace.toTopologicalSpace
x✝¹ x✝ : γ
⊢ dist x✝¹ x✝ = dist x✝¹ x✝
Theorem: Filter.map_map₂
File: Mathlib/Order/Filter/NAry.lean

tactic: rw [← map_prod_eq_map₂, ← map_prod_eq_map₂, map_map]
state_before: α : Type u_3
α' : Type ?u.36106
β : Type u_4
β' : Type ?u.36112
γ : Type u_2
γ' : Type ?u.36118
δ : Type u_1
δ' : Type ?u.36124
ε : Type ?u.36127
ε' : Type ?u.36130
m✝ : α → β → γ
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
h h₁ h₂ : Filter γ
s s₁ s₂ : Set α
t t₁ t₂ : Set β
u : Set γ
v : Set δ
a : α
b : β
c : γ
m : α → β → γ
n : γ → δ
⊢ map n (map₂ m f g) = map₂ (fun a b => n (m a b)) f g

tactic: rfl
state_before: α : Type u_3
α' : Type ?u.36106
β : Type u_4
β' : Type ?u.36112
γ : Type u_2
γ' : Type ?u.36118
δ : Type u_1
δ' : Type ?u.36124
ε : Type ?u.36127
ε' : Type ?u.36130
m✝ : α → β → γ
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
h h₁ h₂ : Filter γ
s s₁ s₂ : Set α
t t₁ t₂ : Set β
u : Set γ
v : Set δ
a : α
b : β
c : γ
m : α → β → γ
n : γ → δ
⊢ map (n ∘ fun p => m p.fst p.snd) (f ×ˢ g) = map (fun p => n (m p.fst p.snd)) (f ×ˢ g)
Theorem: List.get?_set_eq
File: Std/Data/List/Lemmas.lean

tactic: simp only [set_eq_modifyNth, get?_modifyNth_eq]
state_before: α : Type u_1
a : α
n : Nat
l : List α
⊢ get? (set l n a) n = (fun x => a) <$> get? l n
Theorem: Units.eq_inv_mul_iff_mul_eq
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [h, mul_inv_cancel_left]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c✝ u : αˣ
a c : α
h : a = ↑b⁻¹ * c
⊢ ↑b * a = c

tactic: rw [← h, inv_mul_cancel_left]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c✝ u : αˣ
a c : α
h : ↑b * a = c
⊢ a = ↑b⁻¹ * c
Theorem: Polynomial.derivative_X_add_C_sq
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [derivative_sq, derivative_X_add_C, mul_one]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : CommSemiring R
c : R
⊢ ↑derivative ((X + ↑C c) ^ 2) = ↑C 2 * (X + ↑C c)
Theorem: FreeMonoid.countp_of'
File: Mathlib/Algebra/FreeMonoid/Count.lean

tactic: erw [FreeAddMonoid.countp_of]
state_before: α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
⊢ ↑(countp p) (of x) = if p x then ↑Multiplicative.ofAdd 1 else ↑Multiplicative.ofAdd 0

tactic: simp only [eq_iff_iff, iff_true, ofAdd_zero]
state_before: α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
⊢ (if p x = (true = true) then 1 else 0) = if p x then ↑Multiplicative.ofAdd 1 else ↑Multiplicative.ofAdd 0

tactic: rfl
state_before: α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
⊢ (if p x then 1 else 0) = if p x then ↑Multiplicative.ofAdd 1 else 1
Theorem: Cardinal.add_le_add'
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rintro ⟨α⟩ ⟨β⟩ ⟨γ⟩ ⟨δ⟩ ⟨e₁⟩ ⟨e₂⟩
state_before: α β : Type u
⊢ ∀ {a b c d : Cardinal}, a ≤ b → c ≤ d → a + c ≤ b + d

tactic: exact ⟨e₁.sumMap e₂⟩
state_before: case mk.mk.mk.mk.intro.intro
α✝ β✝ : Type u
a✝ : Cardinal
α : Type u_1
b✝ : Cardinal
β : Type u_1
c✝ : Cardinal
γ : Type u_1
d✝ : Cardinal
δ : Type u_1
e₁ : α ↪ β
e₂ : γ ↪ δ
⊢ Quot.mk Setoid.r α + Quot.mk Setoid.r γ ≤ Quot.mk Setoid.r β + Quot.mk Setoid.r δ