tasksource/leandojo huggingface dataset:
Theorem: TypeVec.prod_fst_mk
File: Mathlib/Data/TypeVec.lean

tactic: induction' i with _ _ _ i_ih
state_before: n : ℕ
α β : TypeVec n
i : Fin2 n
a : α i
b : β i
⊢ prod.fst i (prod.mk i a b) = a

tactic: simp_all only [prod.fst, prod.mk]
state_before: case fz
n : ℕ
α✝ β✝ : TypeVec n
i : Fin2 n
a✝ : α✝ i
b✝ : β✝ i
n✝ : ℕ
α β : TypeVec (succ n✝)
a : α Fin2.fz
b : β Fin2.fz
⊢ prod.fst Fin2.fz (prod.mk Fin2.fz a b) = a

case fs
n : ℕ
α✝ β✝ : TypeVec n
i : Fin2 n
a✝¹ : α✝ i
b✝ : β✝ i
n✝ : ℕ
a✝ : Fin2 n✝
i_ih : ∀ {α β : TypeVec n✝} (a : α a✝) (b : β a✝), prod.fst a✝ (prod.mk a✝ a b) = a
α β : TypeVec (succ n✝)
a : α (Fin2.fs a✝)
b : β (Fin2.fs a✝)
⊢ prod.fst (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) a b) = a

tactic: apply i_ih
state_before: case fs
n : ℕ
α✝ β✝ : TypeVec n
i : Fin2 n
a✝¹ : α✝ i
b✝ : β✝ i
n✝ : ℕ
a✝ : Fin2 n✝
i_ih : ∀ {α β : TypeVec n✝} (a : α a✝) (b : β a✝), prod.fst a✝ (prod.mk a✝ a b) = a
α β : TypeVec (succ n✝)
a : α (Fin2.fs a✝)
b : β (Fin2.fs a✝)
⊢ prod.fst (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) a b) = a
Theorem: map_mul_left_nhds_one
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x✝ : α
x : G
⊢ map ((fun x x_1 => x * x_1) x) (𝓝 1) = 𝓝 x
Theorem: finsuppTensorFinsupp'_apply_apply
File: Mathlib/LinearAlgebra/DirectSum/Finsupp.lean

tactic: simp [finsuppTensorFinsupp']
state_before: R : Type u
M : Type v
N : Type w
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
S : Type u_2
inst✝ : CommRing S
α : Type u_1
β : Type u_3
f : α →₀ S
g : β →₀ S
a : α
b : β
⊢ ↑(↑(finsuppTensorFinsupp' S α β) (f ⊗ₜ[S] g)) (a, b) = ↑f a * ↑g b
Theorem: isClosed_setOf_lipschitzWith
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: simp only [← lipschitz_on_univ, isClosed_setOf_lipschitzOnWith]
state_before: α✝ : Type ?u.433749
β✝ : Type ?u.433752
γ : Type ?u.433755
inst✝² : PseudoEMetricSpace α✝
α : Type u_1
β : Type u_2
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
K : ℝ≥0
⊢ IsClosed {f | LipschitzWith K f}
Theorem: Basis.prod_apply_inl_snd
File: Mathlib/LinearAlgebra/Basis.lean

tactic: ext j
state_before: ι : Type u_3
ι' : Type u_4
R : Type u_5
R₂ : Type ?u.578423
K : Type ?u.578426
M : Type u_2
M' : Type u_1
M'' : Type ?u.578435
V : Type u
V' : Type ?u.578440
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
i : ι
⊢ ↑b'.repr (↑(Basis.prod b b') (Sum.inl i)).snd = ↑b'.repr 0

tactic: simp only [Basis.prod, Basis.coe_ofRepr, LinearEquiv.symm_trans_apply, LinearEquiv.prod_symm,
  LinearEquiv.prod_apply, b'.repr.apply_symm_apply, LinearEquiv.symm_symm, repr_self,
  Equiv.toFun_as_coe, Finsupp.snd_sumFinsuppLEquivProdFinsupp, LinearEquiv.map_zero,
  Finsupp.zero_apply]
state_before: case h
ι : Type u_3
ι' : Type u_4
R : Type u_5
R₂ : Type ?u.578423
K : Type ?u.578426
M : Type u_2
M' : Type u_1
M'' : Type ?u.578435
V : Type u
V' : Type ?u.578440
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
i : ι
j : ι'
⊢ ↑(↑b'.repr (↑(Basis.prod b b') (Sum.inl i)).snd) j = ↑(↑b'.repr 0) j

tactic: apply Finsupp.single_eq_of_ne Sum.inl_ne_inr
state_before: case h
ι : Type u_3
ι' : Type u_4
R : Type u_5
R₂ : Type ?u.578423
K : Type ?u.578426
M : Type u_2
M' : Type u_1
M'' : Type ?u.578435
V : Type u
V' : Type ?u.578440
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
i : ι
j : ι'
⊢ ↑(Finsupp.single (Sum.inl i) 1) (Sum.inr j) = 0
Theorem: Fintype.prod_subsingleton
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: haveI : Unique α := uniqueOfSubsingleton a
state_before: ι : Type ?u.880413
β✝ : Type u
α✝ : Type v
γ : Type w
s s₁ s₂ : Finset α✝
a✝ : α✝
f✝ g : α✝ → β✝
α : Type u_1
β : Type u_2
inst✝² : CommMonoid β
inst✝¹ : Subsingleton α
inst✝ : Fintype α
f : α → β
a : α
⊢ ∏ x : α, f x = f a

tactic: rw [prod_unique f, Subsingleton.elim default a]
state_before: ι : Type ?u.880413
β✝ : Type u
α✝ : Type v
γ : Type w
s s₁ s₂ : Finset α✝
a✝ : α✝
f✝ g : α✝ → β✝
α : Type u_1
β : Type u_2
inst✝² : CommMonoid β
inst✝¹ : Subsingleton α
inst✝ : Fintype α
f : α → β
a : α
this : Unique α
⊢ ∏ x : α, f x = f a
Theorem: Basis.toDual_apply
File: Mathlib/LinearAlgebra/Dual.lean

tactic: erw [constr_basis b, constr_basis b]
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DecidableEq ι
b : Basis ι R M
i j : ι
⊢ ↑(↑(toDual b) (↑b i)) (↑b j) = if i = j then 1 else 0

tactic: simp only [eq_comm]
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DecidableEq ι
b : Basis ι R M
i j : ι
⊢ (if j = i then 1 else 0) = if i = j then 1 else 0
Theorem: MeasureTheory.Measure.toSignedMeasure_toMeasureOfZeroLE
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: refine' Measure.ext fun i hi => _
state_before: α : Type u_1
β : Type ?u.720670
m : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
⊢ SignedMeasure.toMeasureOfZeroLE (toSignedMeasure μ) Set.univ (_ : MeasurableSet Set.univ)
      (_ : VectorMeasure.restrict 0 Set.univ ≤ VectorMeasure.restrict (toSignedMeasure μ) Set.univ) =
    μ

tactic: lift μ i to ℝ≥0 using (measure_lt_top _ _).ne with m hm
state_before: α : Type u_1
β : Type ?u.720670
m : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
i : Set α
hi : MeasurableSet i
⊢ ↑↑(SignedMeasure.toMeasureOfZeroLE (toSignedMeasure μ) Set.univ (_ : MeasurableSet Set.univ)
            (_ : VectorMeasure.restrict 0 Set.univ ≤ VectorMeasure.restrict (toSignedMeasure μ) Set.univ))
      i =
    ↑↑μ i

tactic: rw [SignedMeasure.toMeasureOfZeroLE_apply _ _ _ hi, coe_eq_coe]
state_before: case intro
α : Type u_1
β : Type ?u.720670
m✝ : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
i : Set α
hi : MeasurableSet i
m : ℝ≥0
hm : ↑m = ↑↑μ i
⊢ ↑↑(SignedMeasure.toMeasureOfZeroLE (toSignedMeasure μ) Set.univ (_ : MeasurableSet Set.univ)
            (_ : VectorMeasure.restrict 0 Set.univ ≤ VectorMeasure.restrict (toSignedMeasure μ) Set.univ))
      i =
    ↑m

tactic: congr
state_before: case intro
α : Type u_1
β : Type ?u.720670
m✝ : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
i : Set α
hi : MeasurableSet i
m : ℝ≥0
hm : ↑m = ↑↑μ i
⊢ { val := ↑(toSignedMeasure μ) (Set.univ ∩ i), property := (_ : 0 ≤ ↑(toSignedMeasure μ) (Set.univ ∩ i)) } = m

tactic: simp [hi, ← hm]
state_before: case intro.e_val
α : Type u_1
β : Type ?u.720670
m✝ : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
i : Set α
hi : MeasurableSet i
m : ℝ≥0
hm : ↑m = ↑↑μ i
⊢ ↑(toSignedMeasure μ) (Set.univ ∩ i) = ↑m
Theorem: Polynomial.degree_prod_le
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: simpa only [Multiset.map_map] using degree_multiset_prod_le (s.1.map f)
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ degree (∏ i in s, f i) ≤ ∑ i in s, degree (f i)
Theorem: WithBot.le_coe_iff
File: Mathlib/Order/WithBot.lean

tactic: simp [some_eq_coe, coe_eq_coe]
state_before: α : Type u_1
β : Type ?u.13300
γ : Type ?u.13303
δ : Type ?u.13306
a b✝ : α
inst✝ : LE α
b : α
⊢ Option.some b ≤ ↑b✝ ↔ ∀ (a : α), Option.some b = ↑a → a ≤ b✝

tactic: simp [none_eq_bot]
state_before: α : Type u_1
β : Type ?u.13300
γ : Type ?u.13303
δ : Type ?u.13306
a b : α
inst✝ : LE α
⊢ none ≤ ↑b ↔ ∀ (a : α), none = ↑a → a ≤ b
Theorem: ProbabilityTheory.kernel.set_integral_const
File: Mathlib/Probability/Kernel/Basic.lean

tactic: rw [kernel.const_apply]
state_before: α : Type u_3
β : Type u_2
ι : Type ?u.1211581
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : β → E
μ : MeasureTheory.Measure β
a : α
s : Set β
⊢ (∫ (x : β) in s, f x ∂↑(const α μ) a) = ∫ (x : β) in s, f x ∂μ
Theorem: Nat.sub_one_sub_lt
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.sub_sub]
state_before: i n : Nat
h : i < n
⊢ n - 1 - i < n

tactic: apply Nat.sub_lt (Nat.lt_of_lt_of_le (Nat.zero_lt_succ _) h)
state_before: i n : Nat
h : i < n
⊢ n - (1 + i) < n

tactic: rw [Nat.add_comm]
state_before: i n : Nat
h : i < n
⊢ 0 < 1 + i

tactic: apply Nat.zero_lt_succ
state_before: i n : Nat
h : i < n
⊢ 0 < i + 1
Theorem: Real.rpow_def_of_nonneg
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: simp only [rpow_def, Complex.cpow_def]
state_before: x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y)

tactic: split_ifs <;>
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
(Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
state_before: x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ (if ↑x = 0 then if ↑y = 0 then 1 else 0 else Complex.exp (Complex.log ↑x * ↑y)).re =
    if x = 0 then if y = 0 then 1 else 0 else exp (log x * y)
Theorem: UpperSet.mem_iSup₂_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp_rw [mem_iSup_iff]
state_before: α : Type u_1
β : Type ?u.60048
γ : Type ?u.60051
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : (i : ι) → κ i → UpperSet α
⊢ (a ∈ ⨆ (i : ι) (j : κ i), f i j) ↔ ∀ (i : ι) (j : κ i), a ∈ f i j
Theorem: RatFunc.num_mul_eq_mul_denom_iff
File: Mathlib/FieldTheory/RatFunc.lean

tactic: rw [← (algebraMap_injective K).eq_iff, eq_div_iff (algebraMap_ne_zero hq)]
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
p q : K[X]
hq : q ≠ 0
⊢ num x * q = p * denom x ↔ x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q

tactic: conv_rhs => rw [← num_div_denom x]
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
p q : K[X]
hq : q ≠ 0
⊢ ↑(algebraMap K[X] (RatFunc K)) (num x * q) = ↑(algebraMap K[X] (RatFunc K)) (p * denom x) ↔
    x * ↑(algebraMap K[X] (RatFunc K)) q = ↑(algebraMap K[X] (RatFunc K)) p

tactic: rw [RingHom.map_mul, RingHom.map_mul, div_eq_mul_inv, mul_assoc, mul_comm (Inv.inv _), ←
  mul_assoc, ← div_eq_mul_inv, div_eq_iff]
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
p q : K[X]
hq : q ≠ 0
⊢ ↑(algebraMap K[X] (RatFunc K)) (num x * q) = ↑(algebraMap K[X] (RatFunc K)) (p * denom x) ↔
    ↑(algebraMap K[X] (RatFunc K)) (num x) / ↑(algebraMap K[X] (RatFunc K)) (denom x) *
        ↑(algebraMap K[X] (RatFunc K)) q =
      ↑(algebraMap K[X] (RatFunc K)) p

tactic: exact algebraMap_ne_zero (denom_ne_zero x)
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
p q : K[X]
hq : q ≠ 0
⊢ ↑(algebraMap K[X] (RatFunc K)) (denom x) ≠ 0
Theorem: HomogeneousLocalization.neg_val
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

tactic: induction y using Quotient.inductionOn
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
y : HomogeneousLocalization 𝒜 x
⊢ val (-y) = -val y

tactic: simp only [Quotient.liftOn₂'_mk, Quotient.liftOn'_mk]
state_before: case h
ι : 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
a✝ : NumDenSameDeg 𝒜 x
⊢ val (-Quotient.mk (Setoid.ker (embedding 𝒜 x)) a✝) = -val (Quotient.mk (Setoid.ker (embedding 𝒜 x)) a✝)

tactic: change Localization.mk _ _ = -Localization.mk _ _
state_before: case h
ι : 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
a✝ : NumDenSameDeg 𝒜 x
⊢ val (-Quotient.mk (Setoid.ker (embedding 𝒜 x)) a✝) = -val (Quotient.mk (Setoid.ker (embedding 𝒜 x)) a✝)

tactic: dsimp only
state_before: case h
ι : 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
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(-a✝).num { val := ↑(-a✝).den, property := (_ : ↑(-a✝).den ∈ x) } =
    -Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

tactic: rw [Localization.neg_mk]
state_before: case h
ι : 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
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(-a✝).num { val := ↑(-a✝).den, property := (_ : ↑(-a✝).den ∈ x) } =
    -Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

tactic: rfl
state_before: case h
ι : 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
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(-a✝).num { val := ↑(-a✝).den, property := (_ : ↑(-a✝).den ∈ x) } =
    Localization.mk (-↑a✝.num) { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }
Theorem: SeminormedGroup.uniformCauchySeqOn_iff_tendstoUniformlyOn_one
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rw [tendstoUniformlyOn_iff_tendstoUniformlyOnFilter,
  uniformCauchySeqOn_iff_uniformCauchySeqOnFilter,
  SeminormedGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_one]
state_before: 𝓕 : Type ?u.514878
𝕜 : Type ?u.514881
α : Type ?u.514884
ι : Type u_2
κ : Type u_1
E : Type ?u.514893
F : Type ?u.514896
G : Type u_3
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s✝ : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
f : ι → κ → G
s : Set κ
l : Filter ι
⊢ UniformCauchySeqOn f l s ↔ TendstoUniformlyOn (fun n z => f n.fst z / f n.snd z) 1 (l ×ˢ l) s
Theorem: Real.one_le_rpow_of_pos_of_le_one_of_nonpos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: convert rpow_le_rpow_of_exponent_ge hx1 hx2 hz
state_before: x y z : ℝ
hx1 : 0 < x
hx2 : x ≤ 1
hz : z ≤ 0
⊢ 1 ≤ x ^ z

tactic: exact (rpow_zero x).symm
state_before: case h.e'_3
x y z : ℝ
hx1 : 0 < x
hx2 : x ≤ 1
hz : z ≤ 0
⊢ 1 = x ^ 0
Theorem: Function.Surjective.valuationRing
File: Mathlib/RingTheory/Valuation/ValuationRing.lean

tactic: obtain ⟨⟨a, rfl⟩, ⟨b, rfl⟩⟩ := hf a, hf b
state_before: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
a b : S
⊢ ∃ c, a * c = b ∨ b * c = a

tactic: obtain ⟨c, rfl | rfl⟩ := ValuationRing.cond a b
state_before: case intro.intro
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
a b : R
⊢ ∃ c, ↑f a * c = ↑f b ∨ ↑f b * c = ↑f a

tactic: exacts [⟨f c, Or.inl <| (map_mul _ _ _).symm⟩, ⟨f c, Or.inr <| (map_mul _ _ _).symm⟩]
state_before: case intro.intro.intro.inl
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
a c : R
⊢ ∃ c_1, ↑f a * c_1 = ↑f (a * c) ∨ ↑f (a * c) * c_1 = ↑f a

case intro.intro.intro.inr
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
b c : R
⊢ ∃ c_1, ↑f (b * c) * c_1 = ↑f b ∨ ↑f b * c_1 = ↑f (b * c)
Theorem: inv_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.24822
G : Type ?u.24825
inst✝ : DivisionMonoid α
a b c : α
⊢ (a / b)⁻¹ = b / a
Theorem: Int.gcd_zero_left
File: Mathlib/Data/Int/GCD.lean

tactic: simp [gcd]
state_before: i : ℤ
⊢ gcd 0 i = natAbs i
Theorem: himp_eq_top_iff
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [← top_le_iff, le_himp_iff, top_inf_eq]
state_before: ι : Type ?u.28953
α : Type u_1
β : Type ?u.28959
inst✝ : GeneralizedHeytingAlgebra α
a b c d : α
⊢ a ⇨ b = ⊤ ↔ a ≤ b
Theorem: Std.AssocList.forIn_eq
File: Std/Data/AssocList.lean

tactic: simp [forIn, List.forIn]
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
l : AssocList α β
init : δ
f : α × β → δ → m (ForInStep δ)
⊢ forIn l init f = forIn (toList l) init f

tactic: induction l generalizing init <;> simp [AssocList.forIn, List.forIn.loop]
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
l : AssocList α β
init : δ
f : α × β → δ → m (ForInStep δ)
⊢ AssocList.forIn l init f = List.forIn.loop f (toList l) init

tactic: congr
state_before: case cons
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), AssocList.forIn tail✝ init f = List.forIn.loop f (toList tail✝) init
init : δ
⊢ (do
      let __do_lift ← f (key✝, value✝) init
      match __do_lift with
        | ForInStep.done d => pure d
        | ForInStep.yield d => AssocList.forIn tail✝ d f) =
    do
    let __do_lift ← f (key✝, value✝) init
    match __do_lift with
      | ForInStep.done d => pure d
      | ForInStep.yield b => List.forIn.loop f (toList tail✝) b

tactic: funext a
state_before: case cons.e_a
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), AssocList.forIn tail✝ init f = List.forIn.loop f (toList tail✝) init
init : δ
⊢ (fun __do_lift =>
      match __do_lift with
      | ForInStep.done d => pure d
      | ForInStep.yield d => AssocList.forIn tail✝ d f) =
    fun __do_lift =>
    match __do_lift with
    | ForInStep.done d => pure d
    | ForInStep.yield b => List.forIn.loop f (toList tail✝) b

tactic: split <;> simp [*]
state_before: case cons.e_a.h
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), AssocList.forIn tail✝ init f = List.forIn.loop f (toList tail✝) init
init : δ
a : ForInStep δ
⊢ (match a with
    | ForInStep.done d => pure d
    | ForInStep.yield d => AssocList.forIn tail✝ d f) =
    match a with
    | ForInStep.done d => pure d
    | ForInStep.yield b => List.forIn.loop f (toList tail✝) b
Theorem: rank_tensorProduct
File: Mathlib/LinearAlgebra/FreeModule/Rank.lean

tactic: obtain ⟨⟨_, bM⟩⟩ := Module.Free.exists_basis (R := R) (M := M)
state_before: R : Type u
M : Type v
N : Type w
inst✝⁷ : CommRing R
inst✝⁶ : StrongRankCondition R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Free R N
⊢ Module.rank R (M ⊗[R] N) = Cardinal.lift (Module.rank R M) * Cardinal.lift (Module.rank R N)

tactic: obtain ⟨⟨_, bN⟩⟩ := Module.Free.exists_basis (R := R) (M := N)
state_before: case intro.mk
R : Type u
M : Type v
N : Type w
inst✝⁷ : CommRing R
inst✝⁶ : StrongRankCondition R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Free R N
fst✝ : Type v
bM : Basis fst✝ R M
⊢ Module.rank R (M ⊗[R] N) = Cardinal.lift (Module.rank R M) * Cardinal.lift (Module.rank R N)

tactic: rw [← bM.mk_eq_rank'', ← bN.mk_eq_rank'', ← (bM.tensorProduct bN).mk_eq_rank'', Cardinal.mk_prod]
state_before: case intro.mk.intro.mk
R : Type u
M : Type v
N : Type w
inst✝⁷ : CommRing R
inst✝⁶ : StrongRankCondition R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Free R N
fst✝¹ : Type v
bM : Basis fst✝¹ R M
fst✝ : Type w
bN : Basis fst✝ R N
⊢ Module.rank R (M ⊗[R] N) = Cardinal.lift (Module.rank R M) * Cardinal.lift (Module.rank R N)
Theorem: Nat.pow_succ_factors_toFinset
File: Mathlib/Data/Nat/PrimeFin.lean

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: n k : ℕ
⊢ List.toFinset (factors (n ^ (k + 1))) = List.toFinset (factors n)

tactic: induction' k with k ih
state_before: case inr
n k : ℕ
hn : n ≠ 0
⊢ List.toFinset (factors (n ^ (k + 1))) = List.toFinset (factors n)

tactic: simp
state_before: case inl
k : ℕ
⊢ List.toFinset (factors (0 ^ (k + 1))) = List.toFinset (factors 0)

tactic: simp
state_before: case inr.zero
n : ℕ
hn : n ≠ 0
⊢ List.toFinset (factors (n ^ (zero + 1))) = List.toFinset (factors n)

tactic: rw [pow_succ', factors_mul_toFinset hn (pow_ne_zero _ hn), ih, Finset.union_idempotent]
state_before: case inr.succ
n : ℕ
hn : n ≠ 0
k : ℕ
ih : List.toFinset (factors (n ^ (k + 1))) = List.toFinset (factors n)
⊢ List.toFinset (factors (n ^ (succ k + 1))) = List.toFinset (factors n)
Theorem: CategoryTheory.Limits.pullback_map_diagonal_isPullback
File: Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean

tactic: apply IsPullback.of_iso_pullback _ (pullbackDiagonalMapIdIso f g i).symm
state_before: C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ IsPullback (fst ≫ f) (map f g (f ≫ i) (g ≫ i) (𝟙 X) (𝟙 Y) i (_ : f ≫ i = 𝟙 X ≫ f ≫ i) (_ : g ≫ i = 𝟙 Y ≫ g ≫ i))
    (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))

tactic: simp
state_before: case w₁
C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ (pullbackDiagonalMapIdIso f g i).symm.hom ≫ fst = fst ≫ f

tactic: apply pullback.hom_ext <;> simp
state_before: case w₂
C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ (pullbackDiagonalMapIdIso f g i).symm.hom ≫ snd =
    map f g (f ≫ i) (g ≫ i) (𝟙 X) (𝟙 Y) i (_ : f ≫ i = 𝟙 X ≫ f ≫ i) (_ : g ≫ i = 𝟙 Y ≫ g ≫ i)

tactic: constructor
state_before: C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ CommSq (fst ≫ f) (map f g (f ≫ i) (g ≫ i) (𝟙 X) (𝟙 Y) i (_ : f ≫ i = 𝟙 X ≫ f ≫ i) (_ : g ≫ i = 𝟙 Y ≫ g ≫ i))
    (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))

tactic: apply pullback.hom_ext <;> simp [condition]
state_before: case w
C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ (fst ≫ f) ≫ diagonal i =
    map f g (f ≫ i) (g ≫ i) (𝟙 X) (𝟙 Y) i (_ : f ≫ i = 𝟙 X ≫ f ≫ i) (_ : g ≫ i = 𝟙 Y ≫ g ≫ i) ≫
      map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i)