tasksource/leandojo huggingface dataset:
Theorem: Nat.Linear.Poly.of_isNonZero
File: src/lean/Init/Data/Nat/Linear.lean

tactic: contradiction
state_before: ctx : Context
p : Poly
h : isNonZero [] = true
⊢ denote ctx [] > 0

tactic: by_cases he : v == fixedVar <;> simp [he, isNonZero] at h ⊢
state_before: ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
h : isNonZero ((k, v) :: p) = true
⊢ denote ctx ((k, v) :: p) > 0

tactic: simp [eq_of_beq he, Var.denote]
state_before: case inl
ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
he : (v == fixedVar) = true
h : k > 0
⊢ denote ctx p + k * Var.denote ctx v > 0

tactic: apply Nat.lt_of_succ_le
state_before: case inl
ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
he : (v == fixedVar) = true
h : k > 0
⊢ k + denote ctx p > 0

tactic: exact Nat.le_trans h (Nat.le_add_right ..)
state_before: case inl.h
ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
he : (v == fixedVar) = true
h : k > 0
⊢ succ 0 ≤ k + denote ctx p

tactic: have ih := of_isNonZero ctx h
state_before: case inr
ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
he : ¬(v == fixedVar) = true
h : isNonZero p = true
⊢ denote ctx p + k * Var.denote ctx v > 0

tactic: exact Nat.le_trans ih (Nat.le_add_right ..)
state_before: case inr
ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
he : ¬(v == fixedVar) = true
h : isNonZero p = true
ih : denote ctx p > 0
⊢ denote ctx p + k * Var.denote ctx v > 0
Theorem: sigmaFinsuppEquivDfinsupp_add
File: Mathlib/Data/Finsupp/ToDfinsupp.lean

tactic: ext
state_before: ι : Type u_3
R : Type ?u.76301
M : Type ?u.76304
η : ι → Type u_2
N : Type u_1
inst✝¹ : Semiring R
inst✝ : AddZeroClass N
f g : (i : ι) × η i →₀ N
⊢ ↑sigmaFinsuppEquivDfinsupp (f + g) = ↑sigmaFinsuppEquivDfinsupp f + ↑sigmaFinsuppEquivDfinsupp g

tactic: rfl
state_before: case h.h
ι : Type u_3
R : Type ?u.76301
M : Type ?u.76304
η : ι → Type u_2
N : Type u_1
inst✝¹ : Semiring R
inst✝ : AddZeroClass N
f g : (i : ι) × η i →₀ N
i✝ : ι
a✝ : η i✝
⊢ ↑(↑(↑sigmaFinsuppEquivDfinsupp (f + g)) i✝) a✝ =
    ↑(↑(↑sigmaFinsuppEquivDfinsupp f + ↑sigmaFinsuppEquivDfinsupp g) i✝) a✝
Theorem: Filter.map_equiv_symm
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [map_map, e.self_comp_symm, map_id, map_comap_of_surjective e.surjective]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.284168
ι : Sort x
e : α ≃ β
f : Filter β
⊢ map (↑e) (map (↑e.symm) f) = map (↑e) (comap (↑e) f)
Theorem: Polynomial.monomial_add_erase
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rcases p with ⟨⟩
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
⊢ (↑(monomial n) (coeff p n) + erase n p).toFinsupp = p.toFinsupp

tactic: rw [toFinsupp_add, toFinsupp_monomial, toFinsupp_erase, coeff]
state_before: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ (↑(monomial n) (coeff { toFinsupp := toFinsupp✝ } n) + erase n { toFinsupp := toFinsupp✝ }).toFinsupp =
    { toFinsupp := toFinsupp✝ }.toFinsupp

tactic: exact Finsupp.single_add_erase _ _
state_before: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ Finsupp.single n
        ((match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝ } with
          | { toFinsupp := p } => ↑p)
          n) +
      Finsupp.erase n { toFinsupp := toFinsupp✝ }.toFinsupp =
    { toFinsupp := toFinsupp✝ }.toFinsupp
Theorem: Nat.even_or_odd'
File: Mathlib/Data/Nat/Parity.lean

tactic: simpa only [← two_mul, exists_or, Odd, Even] using even_or_odd n
state_before: m n✝ n : ℕ
⊢ ∃ k, n = 2 * k ∨ n = 2 * k + 1
Theorem: Nat.all_eq_allTR
File: src/lean/Init/Data/Nat/Basic.lean

tactic: simp [allTR.loop]
state_before: f : Nat → Bool
n✝ n : Nat
⊢ (all f n && allTR.loop f (0 + n) 0) = all f (0 + n)

tactic: rw [allTR.loop, add_sub_self_left, ← Bool.and_assoc, succ_add]
state_before: f : Nat → Bool
n✝ m n : Nat
⊢ (all f n && allTR.loop f (succ m + n) (succ m)) = all f (succ m + n)

tactic: exact go m (succ n)
state_before: f : Nat → Bool
n✝ m n : Nat
⊢ (all f n && f n && allTR.loop f (succ (m + n)) m) = all f (succ (m + n))
Theorem: dist_ne_zero
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simpa only [not_iff_not] using dist_eq_zero
state_before: α : Type u
β : Type v
X : Type ?u.549105
ι : Type ?u.549108
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ dist x y ≠ 0 ↔ x ≠ y
Theorem: Set.ite_empty
File: Mathlib/Data/Set/Basic.lean

tactic: simp [Set.ite]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s s' : Set α
⊢ Set.ite ∅ s s' = s'
Theorem: Behrend.sum_sq_le_of_mem_box
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: rw [mem_box] at hx
state_before: α : Type ?u.502797
β : Type ?u.502800
n d k N : ℕ
x : Fin n → ℕ
hx : x ∈ box n d
⊢ ∑ i : Fin n, x i ^ 2 ≤ n * (d - 1) ^ 2

tactic: have : ∀ i, x i ^ 2 ≤ (d - 1) ^ 2 := fun i =>
  Nat.pow_le_pow_of_le_left (Nat.le_pred_of_lt (hx i)) _
state_before: α : Type ?u.502797
β : Type ?u.502800
n d k N : ℕ
x : Fin n → ℕ
hx : ∀ (i : Fin n), x i < d
⊢ ∑ i : Fin n, x i ^ 2 ≤ n * (d - 1) ^ 2

tactic: exact (sum_le_card_nsmul univ _ _ fun i _ => this i).trans (by rw [card_fin, smul_eq_mul])
state_before: α : Type ?u.502797
β : Type ?u.502800
n d k N : ℕ
x : Fin n → ℕ
hx : ∀ (i : Fin n), x i < d
this : ∀ (i : Fin n), x i ^ 2 ≤ (d - 1) ^ 2
⊢ ∑ i : Fin n, x i ^ 2 ≤ n * (d - 1) ^ 2

tactic: rw [card_fin, smul_eq_mul]
state_before: α : Type ?u.502797
β : Type ?u.502800
n d k N : ℕ
x : Fin n → ℕ
hx : ∀ (i : Fin n), x i < d
this : ∀ (i : Fin n), x i ^ 2 ≤ (d - 1) ^ 2
⊢ card univ • (d - 1) ^ 2 ≤ n * (d - 1) ^ 2
Theorem: EquivFunctor.mapEquiv_trans
File: Mathlib/Control/EquivFunctor.lean

tactic: simp [mapEquiv, map_trans']
state_before: f : Type u₀ → Type u₁
inst✝ : EquivFunctor f
α β : Type u₀
e : α ≃ β
γ : Type u₀
ab : α ≃ β
bc : β ≃ γ
x : f α
⊢ ↑((mapEquiv f ab).trans (mapEquiv f bc)) x = ↑(mapEquiv f (ab.trans bc)) x
Theorem: List.count_le_count_map
File: Mathlib/Data/List/Count.lean

tactic: rw [count, count, countp_map]
state_before: α : Type u_2
l✝ : List α
inst✝¹ : DecidableEq α
β : Type u_1
inst✝ : DecidableEq β
l : List α
f : α → β
x : α
⊢ count x l ≤ count (f x) (map f l)

tactic: exact countp_mono_left <| by simp (config := {contextual := true})
state_before: α : Type u_2
l✝ : List α
inst✝¹ : DecidableEq α
β : Type u_1
inst✝ : DecidableEq β
l : List α
f : α → β
x : α
⊢ countp (fun x_1 => x_1 == x) l ≤ countp ((fun x_1 => x_1 == f x) ∘ f) l

tactic: simp (config := {contextual := true})
state_before: α : Type u_2
l✝ : List α
inst✝¹ : DecidableEq α
β : Type u_1
inst✝ : DecidableEq β
l : List α
f : α → β
x : α
⊢ ∀ (x_1 : α), x_1 ∈ l → (x_1 == x) = true → ((fun x_2 => x_2 == f x) ∘ f) x_1 = true
Theorem: CategoryTheory.Limits.HasZeroObject.zeroIsoInitial_inv
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: ext
state_before: C : Type u
inst✝⁴ : Category C
D : Type u'
inst✝³ : Category D
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasInitial C
⊢ zeroIsoInitial.inv = 0
Theorem: Int.neg_eq_neg_one_mul
File: Std/Data/Int/Lemmas.lean

tactic: rw [Nat.one_mul]
state_before: n : Nat
⊢ -↑(succ n) = -[1 * n+1]

tactic: rfl
state_before: n : Nat
⊢ -↑(succ n) = -[n+1]

tactic: rw [Nat.one_mul]
state_before: n : Nat
⊢ - -[n+1] = ofNat (succ 0 * succ n)

tactic: rfl
state_before: n : Nat
⊢ - -[n+1] = ofNat (succ n)
Theorem: Algebra.leftMulMatrix_eq_repr_mul
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: rw [leftMulMatrix_apply, toMatrix_lmul' b x i j]
state_before: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : Ring S
inst✝² : Algebra R S
m : Type u_3
inst✝¹ : Fintype m
inst✝ : DecidableEq m
b : Basis m R S
x : S
i j : m
⊢ ↑(leftMulMatrix b) x i j = ↑(↑b.repr (x * ↑b j)) i
Theorem: MeasureTheory.ProbabilityMeasure.tendsto_measure_of_null_frontier_of_tendsto
File: Mathlib/MeasureTheory/Measure/Portmanteau.lean

tactic: have E_nullbdry' : (μ : Measure Ω) (frontier E) = 0 := by
  rw [← ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure, E_nullbdry, ENNReal.coe_zero]
state_before: Ω✝ : Type ?u.40691
inst✝³ : MeasurableSpace Ω✝
Ω : Type u_1
ι : Type u_2
L : Filter ι
inst✝² : MeasurableSpace Ω
inst✝¹ : PseudoEMetricSpace Ω
inst✝ : OpensMeasurableSpace Ω
μ : ProbabilityMeasure Ω
μs : ι → ProbabilityMeasure Ω
μs_lim : Tendsto μs L (𝓝 μ)
E : Set Ω
E_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0
⊢ Tendsto (fun i => (fun s => ENNReal.toNNReal (↑↑↑(μs i) s)) E) L (𝓝 ((fun s => ENNReal.toNNReal (↑↑↑μ s)) E))

tactic: have key := ProbabilityMeasure.tendsto_measure_of_null_frontier_of_tendsto' μs_lim E_nullbdry'
state_before: Ω✝ : Type ?u.40691
inst✝³ : MeasurableSpace Ω✝
Ω : Type u_1
ι : Type u_2
L : Filter ι
inst✝² : MeasurableSpace Ω
inst✝¹ : PseudoEMetricSpace Ω
inst✝ : OpensMeasurableSpace Ω
μ : ProbabilityMeasure Ω
μs : ι → ProbabilityMeasure Ω
μs_lim : Tendsto μs L (𝓝 μ)
E : Set Ω
E_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0
E_nullbdry' : ↑↑↑μ (frontier E) = 0
⊢ Tendsto (fun i => (fun s => ENNReal.toNNReal (↑↑↑(μs i) s)) E) L (𝓝 ((fun s => ENNReal.toNNReal (↑↑↑μ s)) E))

tactic: exact (ENNReal.tendsto_toNNReal (measure_ne_top (↑μ) E)).comp key
state_before: Ω✝ : Type ?u.40691
inst✝³ : MeasurableSpace Ω✝
Ω : Type u_1
ι : Type u_2
L : Filter ι
inst✝² : MeasurableSpace Ω
inst✝¹ : PseudoEMetricSpace Ω
inst✝ : OpensMeasurableSpace Ω
μ : ProbabilityMeasure Ω
μs : ι → ProbabilityMeasure Ω
μs_lim : Tendsto μs L (𝓝 μ)
E : Set Ω
E_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0
E_nullbdry' : ↑↑↑μ (frontier E) = 0
key : Tendsto (fun i => ↑↑↑(μs i) E) L (𝓝 (↑↑↑μ E))
⊢ Tendsto (fun i => (fun s => ENNReal.toNNReal (↑↑↑(μs i) s)) E) L (𝓝 ((fun s => ENNReal.toNNReal (↑↑↑μ s)) E))

tactic: rw [← ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure, E_nullbdry, ENNReal.coe_zero]
state_before: Ω✝ : Type ?u.40691
inst✝³ : MeasurableSpace Ω✝
Ω : Type u_1
ι : Type u_2
L : Filter ι
inst✝² : MeasurableSpace Ω
inst✝¹ : PseudoEMetricSpace Ω
inst✝ : OpensMeasurableSpace Ω
μ : ProbabilityMeasure Ω
μs : ι → ProbabilityMeasure Ω
μs_lim : Tendsto μs L (𝓝 μ)
E : Set Ω
E_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0
⊢ ↑↑↑μ (frontier E) = 0
Theorem: Complex.arg_eq_pi_div_two_iff
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: by_cases h₀ : z = 0
state_before: z : ℂ
⊢ arg z = π / 2 ↔ z.re = 0 ∧ 0 < z.im

tactic: constructor
state_before: case neg
z : ℂ
h₀ : ¬z = 0
⊢ arg z = π / 2 ↔ z.re = 0 ∧ 0 < z.im

tactic: simp [h₀, lt_irrefl, Real.pi_div_two_pos.ne]
state_before: case pos
z : ℂ
h₀ : z = 0
⊢ arg z = π / 2 ↔ z.re = 0 ∧ 0 < z.im

tactic: intro h
state_before: case neg.mp
z : ℂ
h₀ : ¬z = 0
⊢ arg z = π / 2 → z.re = 0 ∧ 0 < z.im

tactic: rw [← abs_mul_cos_add_sin_mul_I z, h]
state_before: case neg.mp
z : ℂ
h₀ : ¬z = 0
h : arg z = π / 2
⊢ z.re = 0 ∧ 0 < z.im

tactic: simp [h₀]
state_before: case neg.mp
z : ℂ
h₀ : ¬z = 0
h : arg z = π / 2
⊢ (↑(↑abs z) * (cos ↑(π / 2) + sin ↑(π / 2) * I)).re = 0 ∧ 0 < (↑(↑abs z) * (cos ↑(π / 2) + sin ↑(π / 2) * I)).im

tactic: cases' z with x y
state_before: case neg.mpr
z : ℂ
h₀ : ¬z = 0
⊢ z.re = 0 ∧ 0 < z.im → arg z = π / 2

tactic: rintro ⟨rfl : x = 0, hy : 0 < y⟩
state_before: case neg.mpr.mk
x y : ℝ
h₀ : ¬{ re := x, im := y } = 0
⊢ { re := x, im := y }.re = 0 ∧ 0 < { re := x, im := y }.im → arg { re := x, im := y } = π / 2

tactic: rw [← arg_I, ← arg_real_mul I hy, ofReal_mul', I_re, I_im, MulZeroClass.mul_zero, mul_one]
state_before: case neg.mpr.mk.intro
y : ℝ
h₀ : ¬{ re := 0, im := y } = 0
hy : 0 < y
⊢ arg { re := 0, im := y } = π / 2
Theorem: Int.subNatNat_eq_coe
File: Std/Data/Int/Lemmas.lean

tactic: apply subNatNat_elim m n fun m n i => i = m - n
state_before: m n : Nat
⊢ subNatNat m n = ↑m - ↑n

tactic: intros i n
state_before: case hp
m n : Nat
⊢ ∀ (i n : Nat), ↑i = ↑(n + i) - ↑n

tactic: rw [Int.ofNat_add, Int.sub_eq_add_neg, Int.add_assoc, Int.add_left_comm,
  Int.add_right_neg, Int.add_zero]
state_before: case hp
m n✝ i n : Nat
⊢ ↑i = ↑(n + i) - ↑n

tactic: intros i n
state_before: case hn
m n : Nat
⊢ ∀ (i m : Nat), -[i+1] = ↑m - ↑(m + i + 1)

tactic: simp only [negSucc_coe, ofNat_add, Int.sub_eq_add_neg, Int.neg_add, ← Int.add_assoc]
state_before: case hn
m n✝ i n : Nat
⊢ -[i+1] = ↑n - ↑(n + i + 1)

tactic: rw [← @Int.sub_eq_add_neg n, ← ofNat_sub, Nat.sub_self, ofNat_zero, Int.zero_add]
state_before: case hn
m n✝ i n : Nat
⊢ -↑i + -↑1 = ↑n + -↑n + -↑i + -↑1

tactic: apply Nat.le_refl
state_before: case hn
m n✝ i n : Nat
⊢ n ≤ n
Theorem: Ideal.map_mul
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [_root_.map_mul]
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
r : R
hri : r ∈ I
s : R
hsj : s ∈ J
⊢ ↑f (r * s) ∈ map f I * map f J

tactic: exact mul_mem_mul (mem_map_of_mem f hri) (mem_map_of_mem f hsj)
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
r : R
hri : r ∈ I
s : R
hsj : s ∈ J
⊢ ↑f r * ↑f s ∈ map f I * map f J

tactic: rw [← _root_.map_mul]
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
i : S
x✝¹ : i ∈ ↑f '' ↑I
r : R
hri : r ∈ ↑I
hfri : ↑f r = i
j : S
x✝ : j ∈ ↑f '' ↑J
s : R
hsj : s ∈ ↑J
hfsj : ↑f s = j
⊢ ↑f r * ↑f s ∈ ↑(map f (I * J))

tactic: exact mem_map_of_mem f (mul_mem_mul hri hsj)
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
i : S
x✝¹ : i ∈ ↑f '' ↑I
r : R
hri : r ∈ ↑I
hfri : ↑f r = i
j : S
x✝ : j ∈ ↑f '' ↑J
s : R
hsj : s ∈ ↑J
hfsj : ↑f s = j
⊢ ↑f (r * s) ∈ ↑(map f (I * J))
Theorem: Real.expNear_succ
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [expNear, range_succ, mul_add, add_left_comm, add_assoc, pow_succ, div_eq_mul_inv,
    mul_inv]
state_before: n : ℕ
x r : ℝ
⊢ expNear (n + 1) x r = expNear n x (1 + x / (↑n + 1) * r)

tactic: ac_rfl
state_before: n : ℕ
x r : ℝ
⊢ x * x ^ n * ((↑(Nat.factorial n))⁻¹ * (↑n + 1)⁻¹) * r = x ^ n * (↑(Nat.factorial n))⁻¹ * (x * (↑n + 1)⁻¹ * r)
Theorem: Basis.toDual_apply_right
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [← b.toDual_total_right, b.total_repr]
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 : ι
m : M
⊢ ↑(↑(toDual b) (↑b i)) m = ↑(↑b.repr m) i
Theorem: Units.mul_left_inj
File: Mathlib/Algebra/Group/Units.lean

tactic: simpa only [mul_inv_cancel_right] using congr_arg (fun x : α => x * ↑(a⁻¹ : αˣ)) h
state_before: α : Type u
inst✝ : Monoid α
a✝ b✝ c✝ u a : αˣ
b c : α
h : b * ↑a = c * ↑a
⊢ b = c
Theorem: measurableSet_prod
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: cases' (s ×ˢ t).eq_empty_or_nonempty with h h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.84459
δ : Type ?u.84462
δ' : Type ?u.84465
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
s : Set α
t : Set β
⊢ MeasurableSet (s ×ˢ t) ↔ MeasurableSet s ∧ MeasurableSet t ∨ s = ∅ ∨ t = ∅

tactic: simp [h, prod_eq_empty_iff.mp h]
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type ?u.84459
δ : Type ?u.84462
δ' : Type ?u.84465
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
s : Set α
t : Set β
h : s ×ˢ t = ∅
⊢ MeasurableSet (s ×ˢ t) ↔ MeasurableSet s ∧ MeasurableSet t ∨ s = ∅ ∨ t = ∅

tactic: simp [← not_nonempty_iff_eq_empty, prod_nonempty_iff.mp h, measurableSet_prod_of_nonempty h]
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type ?u.84459
δ : Type ?u.84462
δ' : Type ?u.84465
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
s : Set α
t : Set β
h : Set.Nonempty (s ×ˢ t)
⊢ MeasurableSet (s ×ˢ t) ↔ MeasurableSet s ∧ MeasurableSet t ∨ s = ∅ ∨ t = ∅
Theorem: Ideal.fst_comp_quotientInfEquivQuotientProd
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: apply Quotient.ringHom_ext
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
I J : Ideal R
coprime : I ⊔ J = ⊤
⊢ RingHom.comp (RingHom.fst (R ⧸ I) (R ⧸ J)) ↑(quotientInfEquivQuotientProd I J coprime) =
    Quotient.factor (I ⊓ J) I (_ : I ⊓ J ≤ I)

tactic: ext
state_before: case h
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
I J : Ideal R
coprime : I ⊔ J = ⊤
⊢ RingHom.comp (RingHom.comp (RingHom.fst (R ⧸ I) (R ⧸ J)) ↑(quotientInfEquivQuotientProd I J coprime))
      (Quotient.mk (I ⊓ J)) =
    RingHom.comp (Quotient.factor (I ⊓ J) I (_ : I ⊓ J ≤ I)) (Quotient.mk (I ⊓ J))

tactic: rfl
state_before: case h.a
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
I J : Ideal R
coprime : I ⊔ J = ⊤
x✝ : R
⊢ ↑(RingHom.comp (RingHom.comp (RingHom.fst (R ⧸ I) (R ⧸ J)) ↑(quotientInfEquivQuotientProd I J coprime))
          (Quotient.mk (I ⊓ J)))
      x✝ =
    ↑(RingHom.comp (Quotient.factor (I ⊓ J) I (_ : I ⊓ J ≤ I)) (Quotient.mk (I ⊓ J))) x✝
Theorem: Fin.eq_of_veq
File: Mathlib/Init/Data/Fin/Basic.lean

tactic: cases h
state_before: n iv : ℕ
ilt₁ : iv < n
jv : ℕ
jlt₁ : jv < n
h : { val := iv, isLt := ilt₁ }.val = { val := jv, isLt := jlt₁ }.val
⊢ { val := iv, isLt := ilt₁ } = { val := jv, isLt := jlt₁ }

tactic: rfl
state_before: case refl
n iv : ℕ
ilt₁ jlt₁ : iv < n
⊢ { val := iv, isLt := ilt₁ } = { val := iv, isLt := jlt₁ }
Theorem: Polynomial.rootSet_mapsTo
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: refine' rootSet_maps_to' (fun h₀ => _) f
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁹ : CommRing R
inst✝⁸ : IsDomain R
p✝ q : R[X]
inst✝⁷ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : IsDomain S
inst✝⁴ : Algebra T S
inst✝³ : CommRing S'
inst✝² : IsDomain S'
inst✝¹ : Algebra T S'
inst✝ : NoZeroSMulDivisors T S'
f : S →ₐ[T] S'
⊢ Set.MapsTo (↑f) (rootSet p S) (rootSet p S')

tactic: obtain rfl : p = 0 :=
  map_injective _ (NoZeroSMulDivisors.algebraMap_injective T S') (by rwa [Polynomial.map_zero])
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁹ : CommRing R
inst✝⁸ : IsDomain R
p✝ q : R[X]
inst✝⁷ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : IsDomain S
inst✝⁴ : Algebra T S
inst✝³ : CommRing S'
inst✝² : IsDomain S'
inst✝¹ : Algebra T S'
inst✝ : NoZeroSMulDivisors T S'
f : S →ₐ[T] S'
h₀ : map (algebraMap T S') p = 0
⊢ map (algebraMap T S) p = 0

tactic: exact Polynomial.map_zero _
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁹ : CommRing R
inst✝⁸ : IsDomain R
p q : R[X]
inst✝⁷ : CommRing T
S : Type u_1
S' : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : IsDomain S
inst✝⁴ : Algebra T S
inst✝³ : CommRing S'
inst✝² : IsDomain S'
inst✝¹ : Algebra T S'
inst✝ : NoZeroSMulDivisors T S'
f : S →ₐ[T] S'
h₀ : map (algebraMap T S') 0 = 0
⊢ map (algebraMap T S) 0 = 0

tactic: rwa [Polynomial.map_zero]
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁹ : CommRing R
inst✝⁸ : IsDomain R
p✝ q : R[X]
inst✝⁷ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : IsDomain S
inst✝⁴ : Algebra T S
inst✝³ : CommRing S'
inst✝² : IsDomain S'
inst✝¹ : Algebra T S'
inst✝ : NoZeroSMulDivisors T S'
f : S →ₐ[T] S'
h₀ : map (algebraMap T S') p = 0
⊢ map (algebraMap T S') p = map (algebraMap T S') 0
Theorem: Ordinal.opow_zero
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: by_cases h : a = 0
state_before: a : Ordinal
⊢ a ^ 0 = 1

tactic: simp only [opow_def, if_pos h, sub_zero]
state_before: case pos
a : Ordinal
h : a = 0
⊢ a ^ 0 = 1

tactic: simp only [opow_def, if_neg h, limitRecOn_zero]
state_before: case neg
a : Ordinal
h : ¬a = 0
⊢ a ^ 0 = 1
Theorem: symmDiff_right_comm
File: Mathlib/Order/SymmDiff.lean

tactic: simp_rw [symmDiff_assoc, symmDiff_comm]
state_before: ι : Type ?u.72761
α : Type u_1
β : Type ?u.72767
π : ι → Type ?u.72772
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ b ∆ c = a ∆ c ∆ b
Theorem: CategoryTheory.Adjunction.left_triangle
File: Mathlib/CategoryTheory/Adjunction/Basic.lean

tactic: ext
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
⊢ whiskerRight adj.unit F ≫ whiskerLeft F adj.counit = 𝟙 (𝟭 C ⋙ F)

tactic: dsimp
state_before: case w.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
x✝ : C
⊢ (whiskerRight adj.unit F ≫ whiskerLeft F adj.counit).app x✝ = (𝟙 (𝟭 C ⋙ F)).app x✝

tactic: erw [← adj.homEquiv_counit, Equiv.symm_apply_eq, adj.homEquiv_unit]
state_before: case w.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
x✝ : C
⊢ F.map (adj.unit.app x✝) ≫ adj.counit.app (F.obj x✝) = 𝟙 (F.obj x✝)

tactic: simp
state_before: case w.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
x✝ : C
⊢ adj.unit.app x✝ = adj.unit.app x✝ ≫ G.map (𝟙 (F.obj x✝))
Theorem: Nat.le_sub_iff_add_le
File: Std/Data/Nat/Lemmas.lean

tactic: rw [← Nat.add_sub_cancel x k, Nat.sub_le_sub_right_iff h, Nat.add_sub_cancel]
state_before: x y k : Nat
h : k ≤ y
⊢ x ≤ y - k ↔ x + k ≤ y
Theorem: Submodule.comap_op_mul
File: Mathlib/Algebra/Algebra/Operations.lean

tactic: simp_rw [comap_equiv_eq_map_symm, map_unop_mul]
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M✝ N✝ P Q : Submodule R A
m n : A
M N : Submodule R Aᵐᵒᵖ
⊢ comap (↑(opLinearEquiv R)) (M * N) = comap (↑(opLinearEquiv R)) N * comap (↑(opLinearEquiv R)) M