tasksource/leandojo huggingface dataset:
Theorem: Nat.mul_divisors_filter_prime_pow
File: Mathlib/Data/Nat/Factorization/PrimePow.lean

tactic: rcases eq_or_ne a 0 with (rfl | ha)
state_before: R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : coprime a b
⊢ Finset.filter IsPrimePow (divisors (a * b)) = Finset.filter IsPrimePow (divisors a ∪ divisors b)

tactic: rcases eq_or_ne b 0 with (rfl | hb)
state_before: case inr
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : coprime a b
ha : a ≠ 0
⊢ Finset.filter IsPrimePow (divisors (a * b)) = Finset.filter IsPrimePow (divisors a ∪ divisors b)

tactic: ext n
state_before: case inr.inr
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : coprime a b
ha : a ≠ 0
hb : b ≠ 0
⊢ Finset.filter IsPrimePow (divisors (a * b)) = Finset.filter IsPrimePow (divisors a ∪ divisors b)

tactic: simp only [ha, hb, Finset.mem_union, Finset.mem_filter, Nat.mul_eq_zero, and_true_iff, Ne.def,
  and_congr_left_iff, not_false_iff, Nat.mem_divisors, or_self_iff]
state_before: case inr.inr.a
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n✝ p : R
k a b : ℕ
hab : coprime a b
ha : a ≠ 0
hb : b ≠ 0
n : ℕ
⊢ n ∈ Finset.filter IsPrimePow (divisors (a * b)) ↔ n ∈ Finset.filter IsPrimePow (divisors a ∪ divisors b)

tactic: apply hab.isPrimePow_dvd_mul
state_before: case inr.inr.a
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n✝ p : R
k a b : ℕ
hab : coprime a b
ha : a ≠ 0
hb : b ≠ 0
n : ℕ
⊢ IsPrimePow n → (n ∣ a * b ↔ n ∣ a ∨ n ∣ b)

tactic: simp only [Nat.coprime_zero_left] at hab
state_before: case inl
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k b : ℕ
hab : coprime 0 b
⊢ Finset.filter IsPrimePow (divisors (0 * b)) = Finset.filter IsPrimePow (divisors 0 ∪ divisors b)

tactic: simp [hab, Finset.filter_singleton, not_isPrimePow_one]
state_before: case inl
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k b : ℕ
hab : b = 1
⊢ Finset.filter IsPrimePow (divisors (0 * b)) = Finset.filter IsPrimePow (divisors 0 ∪ divisors b)

tactic: simp only [Nat.coprime_zero_right] at hab
state_before: case inr.inl
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k a : ℕ
ha : a ≠ 0
hab : coprime a 0
⊢ Finset.filter IsPrimePow (divisors (a * 0)) = Finset.filter IsPrimePow (divisors a ∪ divisors 0)

tactic: simp [hab, Finset.filter_singleton, not_isPrimePow_one]
state_before: case inr.inl
R : Type ?u.20477
inst✝ : CommMonoidWithZero R
n p : R
k a : ℕ
ha : a ≠ 0
hab : a = 1
⊢ Finset.filter IsPrimePow (divisors (a * 0)) = Finset.filter IsPrimePow (divisors a ∪ divisors 0)
Theorem: antisymm_iff
File: Mathlib/Order/RelClasses.lean

tactic: rintro rfl
state_before: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsRefl α r
inst✝ : IsAntisymm α r
a b : α
⊢ a = b → r a b ∧ r b a

tactic: exact ⟨refl _, refl _⟩
state_before: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsRefl α r
inst✝ : IsAntisymm α r
a : α
⊢ r a a ∧ r a a
Theorem: Polynomial.toLaurent_X_pow
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: simp only [map_pow, Polynomial.toLaurent_X, T_pow, mul_one]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
⊢ ↑toLaurent (X ^ n) = T ↑n
Theorem: CategoryTheory.StrongMono.of_arrow_iso
File: Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean

tactic: rw [Arrow.iso_w' e]
state_before: C : Type u
inst✝ : Category C
P Q R : C
f✝ : P ⟶ Q
g✝ : Q ⟶ R
A B A' B' : C
f : A ⟶ B
g : A' ⟶ B'
e : Arrow.mk f ≅ Arrow.mk g
h : StrongMono f
⊢ Mono g

tactic: haveI := mono_comp f e.hom.right
state_before: C : Type u
inst✝ : Category C
P Q R : C
f✝ : P ⟶ Q
g✝ : Q ⟶ R
A B A' B' : C
f : A ⟶ B
g : A' ⟶ B'
e : Arrow.mk f ≅ Arrow.mk g
h : StrongMono f
⊢ Mono (e.inv.left ≫ f ≫ e.hom.right)

tactic: apply mono_comp
state_before: C : Type u
inst✝ : Category C
P Q R : C
f✝ : P ⟶ Q
g✝ : Q ⟶ R
A B A' B' : C
f : A ⟶ B
g : A' ⟶ B'
e : Arrow.mk f ≅ Arrow.mk g
h : StrongMono f
this : Mono (f ≫ e.hom.right)
⊢ Mono (e.inv.left ≫ f ≫ e.hom.right)

tactic: intro
state_before: C : Type u
inst✝ : Category C
P Q R : C
f✝ : P ⟶ Q
g✝ : Q ⟶ R
A B A' B' : C
f : A ⟶ B
g : A' ⟶ B'
e : Arrow.mk f ≅ Arrow.mk g
h : StrongMono f
X Y : C
z : X ⟶ Y
⊢ ∀ [inst : Epi z], HasLiftingProperty z g

tactic: apply HasLiftingProperty.of_arrow_iso_right z e
state_before: C : Type u
inst✝¹ : Category C
P Q R : C
f✝ : P ⟶ Q
g✝ : Q ⟶ R
A B A' B' : C
f : A ⟶ B
g : A' ⟶ B'
e : Arrow.mk f ≅ Arrow.mk g
h : StrongMono f
X Y : C
z : X ⟶ Y
inst✝ : Epi z
⊢ HasLiftingProperty z g
Theorem: PiCountable.dist_summable
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: refine summable_of_nonneg_of_le (fun i => ?_) (fun i => min_le_left _ _)
  summable_geometric_two_encode
state_before: E : ℕ → Type ?u.303411
ι : Type u_1
inst✝¹ : Encodable ι
F : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (F i)
x y : (i : ι) → F i
⊢ Summable fun i => min ((1 / 2) ^ encode i) (dist (x i) (y i))

tactic: exact le_min (pow_nonneg (by norm_num) _) dist_nonneg
state_before: E : ℕ → Type ?u.303411
ι : Type u_1
inst✝¹ : Encodable ι
F : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (F i)
x y : (i : ι) → F i
i : ι
⊢ 0 ≤ min ((1 / 2) ^ encode i) (dist (x i) (y i))

tactic: norm_num
state_before: E : ℕ → Type ?u.303411
ι : Type u_1
inst✝¹ : Encodable ι
F : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (F i)
x y : (i : ι) → F i
i : ι
⊢ 0 ≤ 1 / 2
Theorem: String.mapAux_lemma
File: src/lean/Init/Data/String/Basic.lean

tactic: rw [this]
state_before: s : String
i : Pos
c : Char
h : ¬atEnd s i = true
this : (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx = (endPos s).byteIdx - (next s i).byteIdx
⊢ (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx < (endPos s).byteIdx - i.byteIdx

tactic: apply Nat.sub_lt_sub_left (Nat.gt_of_not_le (mt decide_eq_true h)) (lt_next ..)
state_before: s : String
i : Pos
c : Char
h : ¬atEnd s i = true
this : (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx = (endPos s).byteIdx - (next s i).byteIdx
⊢ (endPos s).byteIdx - (next s i).byteIdx < (endPos s).byteIdx - i.byteIdx

tactic: have ⟨k, e⟩ := Nat.le.dest h
state_before: s : String
i : Pos
c : Char
h✝ : ¬atEnd s i = true
h : (endPos s).byteIdx < (next s i).byteIdx
⊢ (fun x => (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx = x) 0

tactic: rw [Nat.succ_add] at e
state_before: s : String
i : Pos
c : Char
h✝ : ¬atEnd s i = true
h : (endPos s).byteIdx < (next s i).byteIdx
k : Nat
e : Nat.succ (endPos s).byteIdx + k = (next s i).byteIdx
⊢ (fun x => (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx = x) 0

tactic: have : ((s.set i c).next i).1 = _ := set_next_add _ _ c 0 k.succ e.symm
state_before: s : String
i : Pos
c : Char
h✝ : ¬atEnd s i = true
h : (endPos s).byteIdx < (next s i).byteIdx
k : Nat
e : Nat.succ ((endPos s).byteIdx + k) = (next s i).byteIdx
⊢ (fun x => (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx = x) 0

tactic: exact Nat.sub_eq_zero_of_le (this ▸ Nat.le_add_right ..)
state_before: s : String
i : Pos
c : Char
h✝ : ¬atEnd s i = true
h : (endPos s).byteIdx < (next s i).byteIdx
k : Nat
e : Nat.succ ((endPos s).byteIdx + k) = (next s i).byteIdx
this : (next (set s i c) i).byteIdx = (endPos (set s i c)).byteIdx + Nat.succ k
⊢ (fun x => (endPos (set s i c)).byteIdx - (next (set s i c) i).byteIdx = x) 0
Theorem: Fin.cast_castAdd_right
File: Mathlib/Data/Fin/Basic.lean

tactic: ext
state_before: n✝ m✝ n m m' : ℕ
i : Fin n
h : n + m' = n + m
⊢ ↑(cast h) (↑(castAdd m') i) = ↑(castAdd m) i

tactic: simp
state_before: case h
n✝ m✝ n m m' : ℕ
i : Fin n
h : n + m' = n + m
⊢ ↑(↑(cast h) (↑(castAdd m') i)) = ↑(↑(castAdd m) i)
Theorem: Submonoid.LocalizationMap.mk'_mul
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: rw [← mul_assoc, ← mul_assoc, mul_inv_right f.map_units, mul_assoc, mul_assoc,
    mul_comm _ (f.toMap x₂), ← mul_assoc, ← mul_assoc, mul_inv_right f.map_units,
    Submonoid.coe_mul, f.toMap.map_mul, f.toMap.map_mul]
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.715064
inst✝ : CommMonoid P
f : LocalizationMap S N
x₁ x₂ : M
y₁ y₂ : { x // x ∈ S }
⊢ ↑(toMap f) (x₁ * x₂) =
    ↑(toMap f) ↑(y₁ * y₂) *
      (↑(toMap f) x₁ *
          ↑(↑(IsUnit.liftRight (MonoidHom.restrict (toMap f) S) (_ : ∀ (y : { x // x ∈ S }), IsUnit (↑(toMap f) ↑y)))
                y₁)⁻¹ *
        (↑(toMap f) x₂ *
          ↑(↑(IsUnit.liftRight (MonoidHom.restrict (toMap f) S) (_ : ∀ (y : { x // x ∈ S }), IsUnit (↑(toMap f) ↑y)))
                y₂)⁻¹))

tactic: ac_rfl
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.715064
inst✝ : CommMonoid P
f : LocalizationMap S N
x₁ x₂ : M
y₁ y₂ : { x // x ∈ S }
⊢ ↑(toMap f) x₁ * ↑(toMap f) x₂ * ↑(toMap f) ↑y₂ * ↑(toMap f) ↑y₁ =
    ↑(toMap f) ↑y₁ * ↑(toMap f) ↑y₂ * ↑(toMap f) x₁ * ↑(toMap f) x₂
Theorem: Int.floor_add_nat
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Int.cast_ofNat, floor_add_int]
state_before: F : Type ?u.134497
α : Type u_1
β : Type ?u.134503
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
n : ℕ
⊢ ⌊a + ↑n⌋ = ⌊a⌋ + ↑n
Theorem: MeasureTheory.OuterMeasure.isCaratheodory_inter
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: rw [← isCaratheodory_compl_iff, Set.compl_inter]
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : IsCaratheodory m s₁
h₂ : IsCaratheodory m s₂
⊢ IsCaratheodory m (s₁ ∩ s₂)

tactic: exact isCaratheodory_union _ (isCaratheodory_compl _ h₁) (isCaratheodory_compl _ h₂)
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : IsCaratheodory m s₁
h₂ : IsCaratheodory m s₂
⊢ IsCaratheodory m (s₁ᶜ ∪ s₂ᶜ)
Theorem: PiLp.nndist_eq_sum
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: push_cast
state_before: p✝ : ℝ≥0∞
𝕜 : Type ?u.208827
𝕜' : Type ?u.208830
ι : Type u_2
α : ι → Type ?u.208838
β✝ : ι → Type ?u.208843
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → PseudoMetricSpace (β i)
hp : p ≠ ⊤
x y : PiLp p β
⊢ ↑(nndist x y) = ↑((∑ i : ι, nndist (x i) (y i) ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p))

tactic: exact dist_eq_sum (p.toReal_pos_iff_ne_top.mpr hp) _ _
state_before: p✝ : ℝ≥0∞
𝕜 : Type ?u.208827
𝕜' : Type ?u.208830
ι : Type u_2
α : ι → Type ?u.208838
β✝ : ι → Type ?u.208843
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → PseudoMetricSpace (β i)
hp : p ≠ ⊤
x y : PiLp p β
⊢ dist x y = (∑ x_1 : ι, dist (x x_1) (y x_1) ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)
Theorem: LinearMap.mul_toMatrix₂_mul
File: Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean

tactic: simp_rw [LinearMap.toMatrix₂_compl₁₂ b₁ b₂, toMatrix_toLin, transpose_transpose]
state_before: R : Type u_1
R₁ : Type ?u.1754195
R₂ : Type ?u.1754198
M✝ : Type ?u.1754201
M₁ : Type u_2
M₂ : Type u_3
M₁' : Type u_8
M₂' : Type u_9
n : Type u_5
m : Type u_6
n' : Type u_4
m' : Type u_7
ι : Type ?u.1754228
inst✝¹⁶ : CommRing R
inst✝¹⁵ : AddCommMonoid M₁
inst✝¹⁴ : Module R M₁
inst✝¹³ : AddCommMonoid M₂
inst✝¹² : Module R M₂
inst✝¹¹ : DecidableEq n
inst✝¹⁰ : Fintype n
inst✝⁹ : DecidableEq m
inst✝⁸ : Fintype m
b₁ : Basis n R M₁
b₂ : Basis m R M₂
inst✝⁷ : AddCommMonoid M₁'
inst✝⁶ : Module R M₁'
inst✝⁵ : AddCommMonoid M₂'
inst✝⁴ : Module R M₂'
b₁' : Basis n' R M₁'
b₂' : Basis m' R M₂'
inst✝³ : Fintype n'
inst✝² : Fintype m'
inst✝¹ : DecidableEq n'
inst✝ : DecidableEq m'
B : M₁ →ₗ[R] M₂ →ₗ[R] R
M : Matrix n' n R
N : Matrix m m' R
⊢ M ⬝ ↑(toMatrix₂ b₁ b₂) B ⬝ N = ↑(toMatrix₂ b₁' b₂') (compl₁₂ B (↑(toLin b₁' b₁) Mᵀ) (↑(toLin b₂' b₂) N))
Theorem: List.reverseAux_reverseAux
File: src/lean/Init/Data/List/Basic.lean

tactic: induction as generalizing bs cs with
| nil => rfl
| cons a as ih => simp [reverseAux, ih (a::bs), ih [a]]
state_before: α : Type u
β : Type v
γ : Type w
as bs cs : List α
⊢ reverseAux (reverseAux as bs) cs = reverseAux bs (reverseAux (reverseAux as nil) cs)

tactic: rfl
state_before: case nil
α : Type u
β : Type v
γ : Type w
bs cs : List α
⊢ reverseAux (reverseAux nil bs) cs = reverseAux bs (reverseAux (reverseAux nil nil) cs)

tactic: simp [reverseAux, ih (a::bs), ih [a]]
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
ih : ∀ (bs cs : List α), reverseAux (reverseAux as bs) cs = reverseAux bs (reverseAux (reverseAux as nil) cs)
bs cs : List α
⊢ reverseAux (reverseAux (a :: as) bs) cs = reverseAux bs (reverseAux (reverseAux (a :: as) nil) cs)
Theorem: MvPolynomial.bind₁_comp_bind₁
File: Mathlib/Data/MvPolynomial/Monad.lean

tactic: ext1
state_before: σ : Type u_4
τ : Type u_2
R : Type u_3
S : Type ?u.419424
T : Type ?u.419427
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
υ : Type u_1
f : σ → MvPolynomial τ R
g : τ → MvPolynomial υ R
⊢ AlgHom.comp (bind₁ g) (bind₁ f) = bind₁ fun i => ↑(bind₁ g) (f i)

tactic: apply bind₁_bind₁
state_before: case hf
σ : Type u_4
τ : Type u_2
R : Type u_3
S : Type ?u.419424
T : Type ?u.419427
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
υ : Type u_1
f : σ → MvPolynomial τ R
g : τ → MvPolynomial υ R
i✝ : σ
⊢ ↑(AlgHom.comp (bind₁ g) (bind₁ f)) (X i✝) = ↑(bind₁ fun i => ↑(bind₁ g) (f i)) (X i✝)
Theorem: Ideal.isPrime_of_isPrime_prod_top'
File: Mathlib/RingTheory/Ideal/Prod.lean

tactic: apply @isPrime_of_isPrime_prod_top _ R
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime (prod ⊤ I)
⊢ IsPrime I

tactic: rw [← map_prodComm_prod]
state_before: case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime (prod ⊤ I)
⊢ IsPrime (prod I ⊤)

tactic: exact map_isPrime_of_equiv _
state_before: case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime (prod ⊤ I)
⊢ IsPrime (map (↑RingEquiv.prodComm) (prod ⊤ I))
Theorem: Int.mul_mod_left
File: Std/Data/Int/DivMod.lean

tactic: simp [h, Int.mul_zero]
state_before: a b : Int
h : b = 0
⊢ mod (a * b) b = 0

tactic: rw [Int.mod_def, Int.mul_div_cancel _ h, Int.mul_comm, Int.sub_self]
state_before: a b : Int
h : ¬b = 0
⊢ mod (a * b) b = 0
Theorem: Set.image_id'
File: Mathlib/Data/Set/Image.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.39227
γ : Type ?u.39230
ι : Sort ?u.39233
ι' : Sort ?u.39236
f : α → β
s✝ t s : Set α
⊢ (fun x => x) '' s = s

tactic: simp
state_before: case h
α : Type u_1
β : Type ?u.39227
γ : Type ?u.39230
ι : Sort ?u.39233
ι' : Sort ?u.39236
f : α → β
s✝ t s : Set α
x✝ : α
⊢ x✝ ∈ (fun x => x) '' s ↔ x✝ ∈ s
Theorem: Real.arccos_eq_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: rw [arccos, sub_eq_iff_eq_add, ← sub_eq_iff_eq_add', div_two_sub_self, neg_pi_div_two_eq_arcsin]
state_before: x : ℝ
⊢ arccos x = π ↔ x ≤ -1
Theorem: Sum.elim_update_left
File: Mathlib/Data/Sum/Basic.lean

tactic: ext x
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
i : α
c : γ
⊢ Sum.elim (update f i c) g = update (Sum.elim f g) (inl i) c

tactic: rcases x with x | x
state_before: case h
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
i : α
c : γ
x : α ⊕ β
⊢ Sum.elim (update f i c) g x = update (Sum.elim f g) (inl i) c x

tactic: by_cases h : x = i
state_before: case h.inl
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
i : α
c : γ
x : α
⊢ Sum.elim (update f i c) g (inl x) = update (Sum.elim f g) (inl i) c (inl x)

tactic: subst h
state_before: case pos
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
i : α
c : γ
x : α
h : x = i
⊢ Sum.elim (update f i c) g (inl x) = update (Sum.elim f g) (inl i) c (inl x)

tactic: simp
state_before: case pos
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
c : γ
x : α
⊢ Sum.elim (update f x c) g (inl x) = update (Sum.elim f g) (inl x) c (inl x)

tactic: simp [h]
state_before: case neg
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
i : α
c : γ
x : α
h : ¬x = i
⊢ Sum.elim (update f i c) g (inl x) = update (Sum.elim f g) (inl i) c (inl x)

tactic: simp
state_before: case h.inr
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type ?u.36815
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → γ
g : β → γ
i : α
c : γ
x : β
⊢ Sum.elim (update f i c) g (inr x) = update (Sum.elim f g) (inl i) c (inr x)
Theorem: MeasurableEmbedding.set_integral_map
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rw [hf.restrict_map, hf.integral_map]
state_before: α : Type u_2
β✝ : Type ?u.136486
E : Type u_3
F : Type ?u.136492
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g✝ : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
β : Type u_1
x✝ : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
g : β → E
s : Set β
⊢ (∫ (y : β) in s, g y ∂Measure.map f μ) = ∫ (x : α) in f ⁻¹' s, g (f x) ∂μ
Theorem: inv_eq_zero
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [inv_eq_iff_eq_inv, inv_zero]
state_before: α : Type ?u.28276
M₀ : Type ?u.28279
G₀ : Type u_1
M₀' : Type ?u.28285
G₀' : Type ?u.28288
F : Type ?u.28291
F' : Type ?u.28294
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
⊢ a⁻¹ = 0 ↔ a = 0
Theorem: Set.subset_image_compl
File: Mathlib/Data/Set/Image.lean

tactic: rw [← image_union]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.46973
ι : Sort ?u.46976
ι' : Sort ?u.46979
f✝ : α → β
s✝ t : Set α
f : α → β
s : Set α
H : Surjective f
⊢ f '' s ∪ f '' sᶜ = univ

tactic: simp [image_univ_of_surjective H]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.46973
ι : Sort ?u.46976
ι' : Sort ?u.46979
f✝ : α → β
s✝ t : Set α
f : α → β
s : Set α
H : Surjective f
⊢ f '' (s ∪ sᶜ) = univ
Theorem: SimpleGraph.Subgraph.iInf_adj_of_nonempty
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: rw [iInf, sInf_adj_of_nonempty (Set.range_nonempty _)]
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
inst✝ : Nonempty ι
f : ι → Subgraph G
⊢ Adj (⨅ (i : ι), f i) a b ↔ ∀ (i : ι), Adj (f i) a b

tactic: simp
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
inst✝ : Nonempty ι
f : ι → Subgraph G
⊢ (∀ (G' : Subgraph G), (G' ∈ Set.range fun i => f i) → Adj G' a b) ↔ ∀ (i : ι), Adj (f i) a b
Theorem: Nat.insert_self_properDivisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: rw [divisors, properDivisors, Ico_succ_right_eq_insert_Ico (one_le_iff_ne_zero.2 h),
  Finset.filter_insert, if_pos (dvd_refl n)]
state_before: n : ℕ
h : n ≠ 0
⊢ insert n (properDivisors n) = divisors n
Theorem: QuasiconvexOn.sup
File: Mathlib/Analysis/Convex/Quasiconvex.lean

tactic: intro r
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.4373
β : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : LinearOrderedAddCommMonoid β
inst✝ : SMul 𝕜 E
s : Set E
f g : E → β
hf : QuasiconvexOn 𝕜 s f
hg : QuasiconvexOn 𝕜 s g
⊢ QuasiconvexOn 𝕜 s (f ⊔ g)

tactic: simp_rw [Pi.sup_def, sup_le_iff, Set.sep_and]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.4373
β : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : LinearOrderedAddCommMonoid β
inst✝ : SMul 𝕜 E
s : Set E
f g : E → β
hf : QuasiconvexOn 𝕜 s f
hg : QuasiconvexOn 𝕜 s g
r : β
⊢ Convex 𝕜 {x | x ∈ s ∧ (f ⊔ g) x ≤ r}

tactic: exact (hf r).inter (hg r)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.4373
β : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : LinearOrderedAddCommMonoid β
inst✝ : SMul 𝕜 E
s : Set E
f g : E → β
hf : QuasiconvexOn 𝕜 s f
hg : QuasiconvexOn 𝕜 s g
r : β
⊢ Convex 𝕜 ({x | x ∈ s ∧ f x ≤ r} ∩ {x | x ∈ s ∧ g x ≤ r})
Theorem: Filter.smallSets_eq_generate
File: Mathlib/Order/Filter/SmallSets.lean

tactic: simp_rw [generate_eq_biInf, smallSets, iInf_image]
state_before: α : Type u_1
β : Type ?u.169
ι : Sort ?u.172
l l' la : Filter α
lb : Filter β
f : Filter α
⊢ smallSets f = generate (powerset '' f.sets)

tactic: rfl
state_before: α : Type u_1
β : Type ?u.169
ι : Sort ?u.172
l l' la : Filter α
lb : Filter β
f : Filter α
⊢ Filter.lift' f powerset = ⨅ (b : Set α) (_ : b ∈ f.sets), 𝓟 (𝒫 b)
Theorem: Function.invFun_eq
File: Mathlib/Logic/Function/Basic.lean

tactic: simp only [invFun, dif_pos h, h.choose_spec]
state_before: α : Sort u_1
β : Sort u_2
inst✝ : Nonempty α
f : α → β
a : α
b : β
h : ∃ a, f a = b
⊢ f (invFun f b) = b
Theorem: Int.csSup_eq_greatest_of_bdd
File: Mathlib/Data/Int/ConditionallyCompleteOrder.lean

tactic: have : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩
state_before: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ (z : ℤ), z ∈ s → z ≤ b
Hinh : ∃ z, z ∈ s
⊢ sSup s = ↑(greatestOfBdd b Hb Hinh)

tactic: simp only [sSup, this, and_self, dite_true]
state_before: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ (z : ℤ), z ∈ s → z ≤ b
Hinh : ∃ z, z ∈ s
this : Set.Nonempty s ∧ BddAbove s
⊢ sSup s = ↑(greatestOfBdd b Hb Hinh)

tactic: convert (coe_greatestOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddAbove s)) Hinh).symm
state_before: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ (z : ℤ), z ∈ s → z ≤ b
Hinh : ∃ z, z ∈ s
this : Set.Nonempty s ∧ BddAbove s
⊢ ↑(greatestOfBdd (choose (_ : BddAbove s)) (_ : choose (_ : BddAbove s) ∈ upperBounds s) (_ : Set.Nonempty s)) =
    ↑(greatestOfBdd b Hb Hinh)
Theorem: LieModuleHom.comp_ker_incl
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: ext ⟨m, hm⟩
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
f : M →ₗ⁅R,L⁆ N
⊢ comp f (LieSubmodule.incl (ker f)) = 0

tactic: exact (mem_ker m).mp hm
state_before: case h.mk
R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
f : M →ₗ⁅R,L⁆ N
m : M
hm : m ∈ ↑(ker f)
⊢ ↑(comp f (LieSubmodule.incl (ker f))) { val := m, property := hm } = ↑0 { val := m, property := hm }
Theorem: ENNReal.continuous_rpow_const
File: Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean

tactic: refine continuous_iff_continuousAt.2 fun x => ?_
state_before: y : ℝ
⊢ Continuous fun a => a ^ y

tactic: rcases lt_trichotomy (0 : ℝ) y with (hy | rfl | hy)
state_before: y : ℝ
x : ℝ≥0∞
⊢ ContinuousAt (fun a => a ^ y) x

tactic: exact continuousAt_rpow_const_of_pos hy
state_before: case inl
y : ℝ
x : ℝ≥0∞
hy : 0 < y
⊢ ContinuousAt (fun a => a ^ y) x

tactic: simp only [rpow_zero]
state_before: case inr.inl
x : ℝ≥0∞
⊢ ContinuousAt (fun a => a ^ 0) x

tactic: exact continuousAt_const
state_before: case inr.inl
x : ℝ≥0∞
⊢ ContinuousAt (fun a => 1) x

tactic: obtain ⟨z, hz⟩ : ∃ z, y = -z := ⟨-y, (neg_neg _).symm⟩
state_before: case inr.inr
y : ℝ
x : ℝ≥0∞
hy : y < 0
⊢ ContinuousAt (fun a => a ^ y) x

tactic: have z_pos : 0 < z := by simpa [hz] using hy
state_before: case inr.inr.intro
y : ℝ
x : ℝ≥0∞
hy : y < 0
z : ℝ
hz : y = -z
⊢ ContinuousAt (fun a => a ^ y) x

tactic: simp_rw [hz, rpow_neg]
state_before: case inr.inr.intro
y : ℝ
x : ℝ≥0∞
hy : y < 0
z : ℝ
hz : y = -z
z_pos : 0 < z
⊢ ContinuousAt (fun a => a ^ y) x

tactic: exact continuous_inv.continuousAt.comp (continuousAt_rpow_const_of_pos z_pos)
state_before: case inr.inr.intro
y : ℝ
x : ℝ≥0∞
hy : y < 0
z : ℝ
hz : y = -z
z_pos : 0 < z
⊢ ContinuousAt (fun a => (a ^ z)⁻¹) x

tactic: simpa [hz] using hy
state_before: y : ℝ
x : ℝ≥0∞
hy : y < 0
z : ℝ
hz : y = -z
⊢ 0 < z