tasksource/leandojo huggingface dataset:
Theorem: Pell.xn_modEq_x2n_add_lem
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have h1 : d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j =
    (d a1 * yn a1 n * yn a1 n + 1) * xn a1 j := by
  simp [add_mul, mul_assoc]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j

tactic: have h2 : d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n := by
  zify at *
  apply add_eq_of_eq_sub' (Eq.symm (pell_eqz a1 n))
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j

tactic: rw [h2] at h1
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j

tactic: rw [h1, mul_assoc]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j

tactic: exact dvd_mul_right _ _
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ xn a1 n * (xn a1 n * xn a1 j)

tactic: simp [add_mul, mul_assoc]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
⊢ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j

tactic: zify at *
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
⊢ Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n

tactic: apply add_eq_of_eq_sub' (Eq.symm (pell_eqz a1 n))
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 :
  ↑(Pell.d a1) * ↑(yn a1 n) * (↑(yn a1 n) * ↑(xn a1 j)) + ↑(xn a1 j) =
    (↑(Pell.d a1) * ↑(yn a1 n) * ↑(yn a1 n) + 1) * ↑(xn a1 j)
⊢ ↑(Pell.d a1) * ↑(yn a1 n) * ↑(yn a1 n) + 1 = ↑(xn a1 n) * ↑(xn a1 n)
Theorem: ne_zero_of_one_div_ne_zero
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [ha, div_zero] at h
state_before: α : Type ?u.28943
M₀ : Type ?u.28946
G₀ : Type u_1
M₀' : Type ?u.28952
G₀' : Type ?u.28955
F : Type ?u.28958
F' : Type ?u.28961
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : 1 / a ≠ 0
ha : a = 0
⊢ False

tactic: contradiction
state_before: α : Type ?u.28943
M₀ : Type ?u.28946
G₀ : Type u_1
M₀' : Type ?u.28952
G₀' : Type ?u.28955
F : Type ?u.28958
F' : Type ?u.28961
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : 0 ≠ 0
ha : a = 0
⊢ False
Theorem: LaurentPolynomial.degree_C
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: rw [← mul_one (C a), ← T_zero]
state_before: R : Type u_1
inst✝ : Semiring R
a : R
a0 : a ≠ 0
⊢ degree (↑C a) = 0

tactic: exact degree_C_mul_T 0 a a0
state_before: R : Type u_1
inst✝ : Semiring R
a : R
a0 : a ≠ 0
⊢ degree (↑C a * T 0) = 0
Theorem: Nat.sum_append
File: Std/Data/Nat/Lemmas.lean

tactic: induction l₁ <;> simp [*, Nat.add_assoc]
state_before: l₁ l₂ : List Nat
⊢ Nat.sum (l₁ ++ l₂) = Nat.sum l₁ + Nat.sum l₂
Theorem: smul_add_smul_le_smul_add_smul'
File: Mathlib/Algebra/Order/Module.lean

tactic: rw [add_comm (a • d), add_comm (a • c)]
state_before: k : Type u_2
M : Type u_1
N : Type ?u.63738
inst✝⁴ : OrderedRing k
inst✝³ : OrderedAddCommGroup M
inst✝² : Module k M
inst✝¹ : OrderedSMul k M
a✝ b✝ : M
c✝ : k
inst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a b : k
c d : M
hba : b ≤ a
hdc : d ≤ c
⊢ a • d + b • c ≤ a • c + b • d

tactic: exact smul_add_smul_le_smul_add_smul hba hdc
state_before: k : Type u_2
M : Type u_1
N : Type ?u.63738
inst✝⁴ : OrderedRing k
inst✝³ : OrderedAddCommGroup M
inst✝² : Module k M
inst✝¹ : OrderedSMul k M
a✝ b✝ : M
c✝ : k
inst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a b : k
c d : M
hba : b ≤ a
hdc : d ≤ c
⊢ b • c + a • d ≤ b • d + a • c
Theorem: min_lt_max_of_mul_lt_mul
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: simp_rw [pow_two]
state_before: β : Type ?u.146910
A : Type ?u.146913
G : Type ?u.146916
M : Type u_1
R : Type ?u.146922
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : M
h : a * b < c * d
⊢ min a b ^ 2 < max c d ^ 2

tactic: exact
  (mul_le_mul' inf_le_left inf_le_right).trans_lt
    (h.trans_le <| mul_le_mul' le_sup_left le_sup_right)
state_before: β : Type ?u.146910
A : Type ?u.146913
G : Type ?u.146916
M : Type u_1
R : Type ?u.146922
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : M
h : a * b < c * d
⊢ min a b * min a b < max c d * max c d
Theorem: mem_convexJoin
File: Mathlib/Analysis/Convex/Join.lean

tactic: simp [convexJoin]
state_before: ι : Sort ?u.1646
𝕜 : Type u_2
E : Type u_1
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : Module 𝕜 E
s t s₁ s₂ t₁ t₂ u : Set E
x y : E
⊢ x ∈ convexJoin 𝕜 s t ↔ ∃ a, a ∈ s ∧ ∃ b, b ∈ t ∧ x ∈ segment 𝕜 a b
Theorem: Submodule.liftQ_mkQ
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: ext
state_before: R : Type u_1
M : Type u_3
r : R
x y : M
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
p p' : Submodule R M
R₂ : Type u_2
M₂ : Type u_4
inst✝² : Ring R₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R₂ M₂
τ₁₂ : R →+* R₂
f : M →ₛₗ[τ₁₂] M₂
h : p ≤ ker f
⊢ comp (liftQ p f h) (mkQ p) = f

tactic: rfl
state_before: case h
R : Type u_1
M : Type u_3
r : R
x y : M
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
p p' : Submodule R M
R₂ : Type u_2
M₂ : Type u_4
inst✝² : Ring R₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R₂ M₂
τ₁₂ : R →+* R₂
f : M →ₛₗ[τ₁₂] M₂
h : p ≤ ker f
x✝ : M
⊢ ↑(comp (liftQ p f h) (mkQ p)) x✝ = ↑f x✝
Theorem: Rat.uniformContinuous_add
File: Mathlib/Topology/Instances/Rat.lean

tactic: exact Real.uniformContinuous_add.comp
  (Rat.uniformContinuous_coe_real.prod_map Rat.uniformContinuous_coe_real)
state_before: ⊢ UniformContinuous fun x => ↑x.fst + ↑x.snd
Theorem: Irrational.mul_rat
File: Mathlib/Data/Real/Irrational.lean

tactic: rwa [mul_assoc, ← cast_mul, mul_inv_cancel hq, cast_one, mul_one]
state_before: q✝ : ℚ
x y : ℝ
h : Irrational x
q : ℚ
hq : q ≠ 0
⊢ Irrational (x * ↑q * ↑q⁻¹)
Theorem: FreeGroup.Red.red_iff_irreducible
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: apply reflTransGen_iff_eq
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
x1 : α
b1 : Bool
x2 : α
b2 : Bool
h : (x1, b1) ≠ (x2, b2)
⊢ Red [(x1, !b1), (x2, b2)] L ↔ L = [(x1, !b1), (x2, b2)]

tactic: generalize eq : [(x1, not b1), (x2, b2)] = L'
state_before: case h
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
x1 : α
b1 : Bool
x2 : α
b2 : Bool
h : (x1, b1) ≠ (x2, b2)
⊢ ∀ (b : List (α × Bool)), ¬Step [(x1, !b1), (x2, b2)] b

tactic: intro L h'
state_before: case h
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
x1 : α
b1 : Bool
x2 : α
b2 : Bool
h : (x1, b1) ≠ (x2, b2)
L' : List (α × Bool)
eq : [(x1, !b1), (x2, b2)] = L'
⊢ ∀ (b : List (α × Bool)), ¬Step L' b

tactic: cases h'
state_before: case h
α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
x1 : α
b1 : Bool
x2 : α
b2 : Bool
h : (x1, b1) ≠ (x2, b2)
L' : List (α × Bool)
eq : [(x1, !b1), (x2, b2)] = L'
L : List (α × Bool)
h' : Step L' L
⊢ False

tactic: simp [List.cons_eq_append_iff, List.nil_eq_append] at eq
state_before: case h.not
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
x1 : α
b1 : Bool
x2 : α
b2 : Bool
h : (x1, b1) ≠ (x2, b2)
L₁✝ L₂✝ : List (α × Bool)
x✝ : α
b✝ : Bool
eq : [(x1, !b1), (x2, b2)] = L₁✝ ++ (x✝, b✝) :: (x✝, !b✝) :: L₂✝
⊢ False

tactic: rcases eq with ⟨rfl, ⟨rfl, rfl⟩, ⟨rfl, rfl⟩, rfl⟩
state_before: case h.not
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
x1 : α
b1 : Bool
x2 : α
b2 : Bool
h : (x1, b1) ≠ (x2, b2)
L₁✝ L₂✝ : List (α × Bool)
x✝ : α
b✝ : Bool
eq : L₁✝ = [] ∧ (x✝ = x1 ∧ b✝ = !b1) ∧ (x✝ = x2 ∧ (!b✝) = b2) ∧ L₂✝ = []
⊢ False

tactic: subst_vars
state_before: case h.not.intro.intro.intro.intro.intro
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
b1 : Bool
x✝ : α
h : (x✝, b1) ≠ (x✝, !!b1)
⊢ False

tactic: simp at h
state_before: case h.not.intro.intro.intro.intro.intro
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
b1 : Bool
x✝ : α
h : (x✝, b1) ≠ (x✝, !!b1)
⊢ False
Theorem: ENNReal.rpow_mul
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: cases' x with x
state_before: x : ℝ≥0∞
y z : ℝ
⊢ x ^ (y * z) = (x ^ y) ^ z

tactic: rcases lt_trichotomy y 0 with (Hy | Hy | Hy) <;>
    rcases lt_trichotomy z 0 with (Hz | Hz | Hz) <;>
  simp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos,
    mul_pos_of_neg_of_neg, mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]
state_before: case none
y z : ℝ
⊢ none ^ (y * z) = (none ^ y) ^ z

tactic: by_cases h : x = 0
state_before: case some
y z : ℝ
x : ℝ≥0
⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z

tactic: rcases lt_trichotomy y 0 with (Hy | Hy | Hy) <;>
    rcases lt_trichotomy z 0 with (Hz | Hz | Hz) <;>
  simp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos,
    mul_pos_of_neg_of_neg, mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]
state_before: case pos
y z : ℝ
x : ℝ≥0
h : x = 0
⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z

tactic: have : x ^ y ≠ 0 := by simp [h]
state_before: case neg
y z : ℝ
x : ℝ≥0
h : ¬x = 0
⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z

tactic: simp [coe_rpow_of_ne_zero h, coe_rpow_of_ne_zero this, NNReal.rpow_mul]
state_before: case neg
y z : ℝ
x : ℝ≥0
h : ¬x = 0
this : x ^ y ≠ 0
⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z

tactic: simp [h]
state_before: y z : ℝ
x : ℝ≥0
h : ¬x = 0
⊢ x ^ y ≠ 0
Theorem: Filter.map_sub_atTop_eq_nat
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [add_tsub_cancel_right]
state_before: ι : Type ?u.343771
ι' : Type ?u.343774
α : Type ?u.343777
β : Type ?u.343780
γ : Type ?u.343783
k b : ℕ
x✝ : b ≥ 0
⊢ b ≤ (fun a => a + k) b - k
Theorem: Rat.nonneg_iff_zero_le
File: Mathlib/Data/Rat/Order.lean

tactic: rw [Rat.le_iff_Nonneg]
state_before: a✝ b c a : ℚ
⊢ Rat.Nonneg a ↔ 0 ≤ a

tactic: show Rat.Nonneg a ↔ Rat.Nonneg (a - 0)
state_before: a✝ b c a : ℚ
⊢ Rat.Nonneg a ↔ Rat.Nonneg (a - 0)

tactic: simp
state_before: a✝ b c a : ℚ
⊢ Rat.Nonneg a ↔ Rat.Nonneg (a - 0)
Theorem: LocallyConstant.ofClopen_fiber_one
File: Mathlib/Topology/LocallyConstant/Basic.lean

tactic: ext
state_before: X✝ : Type ?u.21432
Y : Type ?u.21435
Z : Type ?u.21438
α : Type ?u.21441
inst✝² : TopologicalSpace X✝
X : Type u_1
inst✝¹ : TopologicalSpace X
U : Set X
inst✝ : (x : X) → Decidable (x ∈ U)
hU : IsClopen U
⊢ ↑(ofClopen hU) ⁻¹' {1} = Uᶜ

tactic: simp only [ofClopen, mem_singleton_iff, coe_mk, Fin.zero_eq_one_iff, mem_preimage,
  ite_eq_right_iff, mem_compl_iff, Nat.succ_succ_ne_one]
state_before: case h
X✝ : Type ?u.21432
Y : Type ?u.21435
Z : Type ?u.21438
α : Type ?u.21441
inst✝² : TopologicalSpace X✝
X : Type u_1
inst✝¹ : TopologicalSpace X
U : Set X
inst✝ : (x : X) → Decidable (x ∈ U)
hU : IsClopen U
x✝ : X
⊢ x✝ ∈ ↑(ofClopen hU) ⁻¹' {1} ↔ x✝ ∈ Uᶜ
Theorem: Filter.comap_lift_eq
File: Mathlib/Order/Filter/Lift.lean

tactic: simp only [Filter.lift, comap_iInf]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
ι : Sort ?u.14103
f f₁ f₂ : Filter α
g g₁ g₂ : Set α → Filter β
m : γ → β
⊢ comap m (Filter.lift f g) = Filter.lift f (comap m ∘ g)

tactic: rfl
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
ι : Sort ?u.14103
f f₁ f₂ : Filter α
g g₁ g₂ : Set α → Filter β
m : γ → β
⊢ (⨅ (i : Set α) (_ : i ∈ f), comap m (g i)) = ⨅ (s : Set α) (_ : s ∈ f), (comap m ∘ g) s
Theorem: FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_le
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: obtain ⟨S, _, hS⟩ := exists_elementarySubstructure_card_eq L ∅ κ h1 (by simp) h2 h3
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
⊢ ∃ N, Nonempty (↑N ↪ₑ[L] M) ∧ (#↑N) = κ

tactic: have : Small.{w} S := by
  rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS
  exact small_iff_lift_mk_lt_univ.2 (lt_of_eq_of_lt hS κ.lift_lt_univ')
state_before: case intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
S : ElementarySubstructure L M
left✝ : ∅ ⊆ ↑S
hS : lift (#{ x // x ∈ S }) = lift κ
⊢ ∃ N, Nonempty (↑N ↪ₑ[L] M) ∧ (#↑N) = κ

tactic: refine'
  ⟨(equivShrink S).bundledInduced L,
    ⟨S.subtype.comp (Equiv.bundledInducedEquiv L _).symm.toElementaryEmbedding⟩,
    lift_inj.1 (_root_.trans _ hS)⟩
state_before: case intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
S : ElementarySubstructure L M
left✝ : ∅ ⊆ ↑S
hS : lift (#{ x // x ∈ S }) = lift κ
this : Small { x // x ∈ S }
⊢ ∃ N, Nonempty (↑N ↪ₑ[L] M) ∧ (#↑N) = κ

tactic: simp only [Equiv.bundledInduced_α, lift_mk_shrink']
state_before: case intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
S : ElementarySubstructure L M
left✝ : ∅ ⊆ ↑S
hS : lift (#{ x // x ∈ S }) = lift κ
this : Small { x // x ∈ S }
⊢ lift (#↑(Equiv.bundledInduced L (equivShrink { x // x ∈ S }))) = lift (#{ x // x ∈ S })

tactic: simp
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
⊢ lift (#↑∅) ≤ lift κ

tactic: rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
S : ElementarySubstructure L M
left✝ : ∅ ⊆ ↑S
hS : lift (#{ x // x ∈ S }) = lift κ
⊢ Small { x // x ∈ S }

tactic: exact small_iff_lift_mk_lt_univ.2 (lt_of_eq_of_lt hS κ.lift_lt_univ')
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Nonempty M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
h3 : lift κ ≤ lift (#M)
S : ElementarySubstructure L M
left✝ : ∅ ⊆ ↑S
hS : lift (#{ x // x ∈ S }) = lift κ
⊢ Small { x // x ∈ S }
Theorem: set_integral_withDensity_eq_set_integral_smul₀
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rw [restrict_withDensity hs, integral_withDensity_eq_integral_smul₀ hf]
state_before: α : Type u_1
β : Type ?u.4775974
E : Type u_2
F : Type ?u.4775980
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4775986
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4890794
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
s : Set α
hf : AEMeasurable f
g : α → E
hs : MeasurableSet s
⊢ (∫ (a : α) in s, g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α) in s, f a • g a ∂μ
Theorem: MeasureTheory.lintegral_const_mul'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: by_cases h : r = 0
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
⊢ (∫⁻ (a : α), r * f a ∂μ) = r * ∫⁻ (a : α), f a ∂μ

tactic: apply le_antisymm _ (lintegral_const_mul_le r f)
state_before: case neg
α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
⊢ (∫⁻ (a : α), r * f a ∂μ) = r * ∫⁻ (a : α), f a ∂μ

tactic: have rinv : r * r⁻¹ = 1 := ENNReal.mul_inv_cancel h hr
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
⊢ (∫⁻ (a : α), r * f a ∂μ) ≤ r * ∫⁻ (a : α), f a ∂μ

tactic: have rinv' : r⁻¹ * r = 1 := by
  rw [mul_comm]
  exact rinv
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
rinv : r * r⁻¹ = 1
⊢ (∫⁻ (a : α), r * f a ∂μ) ≤ r * ∫⁻ (a : α), f a ∂μ

tactic: have := lintegral_const_mul_le (μ := μ) r⁻¹ fun x => r * f x
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
rinv : r * r⁻¹ = 1
rinv' : r⁻¹ * r = 1
⊢ (∫⁻ (a : α), r * f a ∂μ) ≤ r * ∫⁻ (a : α), f a ∂μ

tactic: simp [(mul_assoc _ _ _).symm, rinv'] at this
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
rinv : r * r⁻¹ = 1
rinv' : r⁻¹ * r = 1
this : (r⁻¹ * ∫⁻ (a : α), r * f a ∂μ) ≤ ∫⁻ (a : α), r⁻¹ * (r * f a) ∂μ
⊢ (∫⁻ (a : α), r * f a ∂μ) ≤ r * ∫⁻ (a : α), f a ∂μ

tactic: simpa [(mul_assoc _ _ _).symm, rinv] using mul_le_mul_left' this r
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
rinv : r * r⁻¹ = 1
rinv' : r⁻¹ * r = 1
this : (r⁻¹ * ∫⁻ (a : α), r * f a ∂μ) ≤ ∫⁻ (a : α), f a ∂μ
⊢ (∫⁻ (a : α), r * f a ∂μ) ≤ r * ∫⁻ (a : α), f a ∂μ

tactic: simp [h]
state_before: case pos
α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : r = 0
⊢ (∫⁻ (a : α), r * f a ∂μ) = r * ∫⁻ (a : α), f a ∂μ

tactic: rw [mul_comm]
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
rinv : r * r⁻¹ = 1
⊢ r⁻¹ * r = 1

tactic: exact rinv
state_before: α : Type u_1
β : Type ?u.937326
γ : Type ?u.937329
δ : Type ?u.937332
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
h : ¬r = 0
rinv : r * r⁻¹ = 1
⊢ r * r⁻¹ = 1
Theorem: Filter.frequently_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp
state_before: ι : Type ?u.27917
ι' : Type ?u.27920
α : Type u_1
β : Type ?u.27926
γ : Type ?u.27929
inst✝¹ : SemilatticeSup α
inst✝ : Nonempty α
p : α → Prop
⊢ (∀ (i : α), True → ∃ x, x ∈ Ici i ∧ p x) ↔ ∀ (a : α), ∃ b, b ≥ a ∧ p b
Theorem: symmDiff_symmDiff_cancel_left
File: Mathlib/Order/SymmDiff.lean

tactic: simp [← symmDiff_assoc]
state_before: ι : Type ?u.73734
α : Type u_1
β : Type ?u.73740
π : ι → Type ?u.73745
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ (a ∆ b) = b
Theorem: Set.image_update_Ioo
File: Mathlib/Data/Set/Intervals/Pi.lean

tactic: rw [← Ico_diff_left, ← Ico_diff_left, image_diff (update_injective _ _), image_singleton,
  image_update_Ico]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → PartialOrder (α i)
f : (i : ι) → α i
i : ι
a b : α i
⊢ update f i '' Ioo a b = Ioo (update f i a) (update f i b)
Theorem: separationRel_comap
File: Mathlib/Topology/UniformSpace/Separation.lean

tactic: subst h
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
h : inst✝² = UniformSpace.comap f inst✝¹
⊢ 𝓢 α = Prod.map f f ⁻¹' 𝓢 β

tactic: dsimp [separationRel]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
⊢ 𝓢 α = Prod.map f f ⁻¹' 𝓢 β

tactic: simp_rw [uniformity_comap, (Filter.comap_hasBasis (Prod.map f f) (𝓤 β)).sInter_sets, ←
  preimage_iInter, sInter_eq_biInter]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
⊢ ⋂₀ (𝓤 α).sets = Prod.map f f ⁻¹' ⋂₀ (𝓤 β).sets

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
⊢ (Prod.map f f ⁻¹' ⋂ (i : Set (β × β)) (_ : i ∈ 𝓤 β), i) = Prod.map f f ⁻¹' ⋂ (i : Set (β × β)) (_ : i ∈ (𝓤 β).sets), i
Theorem: CategoryTheory.braiding_rightUnitor
File: Mathlib/CategoryTheory/Monoidal/Braided.lean

tactic: rw [← tensor_left_iff, id_tensor_comp, braiding_rightUnitor_aux₂]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X : C
⊢ (β_ (𝟙_ C) X).hom ≫ (ρ_ X).hom = (λ_ X).hom
Theorem: String.Iterator.ValidFor.nextn
File: Std/Data/String/Lemmas.lean

tactic: simp [h, Iterator.nextn]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
x✝ : 0 ≤ List.length r
⊢ ValidFor (List.reverse (List.take 0 r) ++ l) (List.drop 0 r) (Iterator.nextn it 0)

tactic: simp [h, Iterator.nextn]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ List.length r
⊢ ValidFor (List.reverse (List.take (n + 1) r) ++ l) (List.drop (n + 1) r) (Iterator.nextn it (n + 1))

tactic: have a::r := r
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ List.length r
⊢ ValidFor (List.reverse (List.take (n + 1) r) ++ l) (List.drop (n + 1) r) (Iterator.nextn (Iterator.next it) n)

tactic: simpa using h.next.nextn _ (Nat.le_of_succ_le_succ hn)
state_before: l r✝ : List Char
it : Iterator
n : Nat
a : Char
r : List Char
h : ValidFor l (a :: r) it
hn : n + 1 ≤ List.length (a :: r)
⊢ ValidFor (List.reverse (List.take (n + 1) (a :: r)) ++ l) (List.drop (n + 1) (a :: r))
    (Iterator.nextn (Iterator.next it) n)
Theorem: MeasureTheory.Content.empty
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: have := μ.sup_disjoint' ⊥ ⊥
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
⊢ (fun s => ↑(toFun μ s)) ⊥ = 0

tactic: simpa [apply_eq_coe_toFun] using this
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
this : Disjoint ↑⊥ ↑⊥ → toFun μ (⊥ ⊔ ⊥) = toFun μ ⊥ + toFun μ ⊥
⊢ (fun s => ↑(toFun μ s)) ⊥ = 0
Theorem: Submodule.bot_ext
File: Mathlib/Algebra/Module/Submodule/Lattice.lean

tactic: rcases x with ⟨x, xm⟩
state_before: R : Type u_2
S : Type ?u.34876
M : Type u_1
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
x y : { x // x ∈ ⊥ }
⊢ x = y

tactic: rcases y with ⟨y, ym⟩
state_before: case mk
R : Type u_2
S : Type ?u.34876
M : Type u_1
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
y : { x // x ∈ ⊥ }
x : M
xm : x ∈ ⊥
⊢ { val := x, property := xm } = y

tactic: congr
state_before: case mk.mk
R : Type u_2
S : Type ?u.34876
M : Type u_1
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
x : M
xm : x ∈ ⊥
y : M
ym : y ∈ ⊥
⊢ { val := x, property := xm } = { val := y, property := ym }

tactic: rw [(Submodule.eq_bot_iff _).mp rfl x xm]
state_before: case mk.mk.e_val
R : Type u_2
S : Type ?u.34876
M : Type u_1
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
x : M
xm : x ∈ ⊥
y : M
ym : y ∈ ⊥
⊢ x = y

tactic: rw [(Submodule.eq_bot_iff _).mp rfl y ym]
state_before: case mk.mk.e_val
R : Type u_2
S : Type ?u.34876
M : Type u_1
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
x : M
xm : x ∈ ⊥
y : M
ym : y ∈ ⊥
⊢ 0 = y