tasksource/leandojo huggingface dataset:
Theorem: generateFrom_piiUnionInter_le
File: Mathlib/MeasureTheory/PiSystem.lean

tactic: refine' generateFrom_le _
state_before: α : Type u_1
ι : Type u_2
m : MeasurableSpace α
π : ι → Set (Set α)
h : ∀ (n : ι), generateFrom (π n) ≤ m
S : Set ι
⊢ generateFrom (piiUnionInter π S) ≤ m

tactic: rintro t ⟨ht_p, _, ft, hft_mem_pi, rfl⟩
state_before: α : Type u_1
ι : Type u_2
m : MeasurableSpace α
π : ι → Set (Set α)
h : ∀ (n : ι), generateFrom (π n) ≤ m
S : Set ι
⊢ ∀ (t : Set α), t ∈ piiUnionInter π S → MeasurableSet t

tactic: refine' Finset.measurableSet_biInter _ fun x hx_mem => (h x) _ _
state_before: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
m : MeasurableSpace α
π : ι → Set (Set α)
h : ∀ (n : ι), generateFrom (π n) ≤ m
S : Set ι
ht_p : Finset ι
w✝ : ↑ht_p ⊆ S
ft : ι → Set α
hft_mem_pi : ∀ (x : ι), x ∈ ht_p → ft x ∈ π x
⊢ MeasurableSet (⋂ (x : ι) (_ : x ∈ ht_p), ft x)

tactic: exact measurableSet_generateFrom (hft_mem_pi x hx_mem)
state_before: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
m : MeasurableSpace α
π : ι → Set (Set α)
h : ∀ (n : ι), generateFrom (π n) ≤ m
S : Set ι
ht_p : Finset ι
w✝ : ↑ht_p ⊆ S
ft : ι → Set α
hft_mem_pi : ∀ (x : ι), x ∈ ht_p → ft x ∈ π x
x : ι
hx_mem : x ∈ ht_p
⊢ MeasurableSet (ft x)
Theorem: CategoryTheory.CommSq.right_adjoint_hasLift_iff
File: Mathlib/CategoryTheory/LiftingProperties/Adjunction.lean

tactic: simp only [HasLift.iff]
state_before: C : Type u_1
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : G.obj A ⟶ X
v : G.obj B ⟶ Y
sq : CommSq u (G.map i) p v
adj : G ⊣ F
⊢ HasLift (_ : CommSq (↑(Adjunction.homEquiv adj A X) u) i (F.map p) (↑(Adjunction.homEquiv adj B Y) v)) ↔ HasLift sq

tactic: exact Equiv.nonempty_congr (sq.rightAdjointLiftStructEquiv adj).symm
state_before: C : Type u_1
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : G.obj A ⟶ X
v : G.obj B ⟶ Y
sq : CommSq u (G.map i) p v
adj : G ⊣ F
⊢ Nonempty (LiftStruct (_ : CommSq (↑(Adjunction.homEquiv adj A X) u) i (F.map p) (↑(Adjunction.homEquiv adj B Y) v))) ↔
    Nonempty (LiftStruct sq)
Theorem: finprod_mem_inter_mul_diff'
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: rw [← finprod_mem_union', inter_union_diff]
state_before: α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ ((∏ᶠ (i : α) (_ : i ∈ s ∩ t), f i) * ∏ᶠ (i : α) (_ : i ∈ s \ t), f i) = ∏ᶠ (i : α) (_ : i ∈ s), f i

tactic: rw [disjoint_iff_inf_le]
state_before: case hst
α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ Disjoint (s ∩ t) (s \ t)

case hs
α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ Set.Finite (s ∩ t ∩ mulSupport fun i => f i)

case ht
α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ Set.Finite (s \ t ∩ mulSupport fun i => f i)

tactic: exacts [fun x hx => hx.2.2 hx.1.2, h.subset fun x hx => ⟨hx.1.1, hx.2⟩,
  h.subset fun x hx => ⟨hx.1.1, hx.2⟩]
state_before: case hst
α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ s ∩ t ⊓ s \ t ≤ ⊥

case hs
α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ Set.Finite (s ∩ t ∩ mulSupport fun i => f i)

case ht
α : Type u_1
β : Type ?u.358627
ι : Type ?u.358630
G : Type ?u.358633
M : Type u_2
N : Type ?u.358639
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t✝ t : Set α
h : Set.Finite (s ∩ mulSupport f)
⊢ Set.Finite (s \ t ∩ mulSupport fun i => f i)
Theorem: Nat.divisors_zero
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext
state_before: n : ℕ
⊢ divisors 0 = ∅

tactic: simp
state_before: case a
n a✝ : ℕ
⊢ a✝ ∈ divisors 0 ↔ a✝ ∈ ∅
Theorem: ZNum.ofInt'_eq
File: Mathlib/Data/Num/Lemmas.lean

tactic: show Num.toZNumNeg (n + 1 : ℕ) = -(n + 1 : ℕ)
state_before: α : Type ?u.1057236
n : ℕ
⊢ ofInt' -[n+1] = ↑-[n+1]

tactic: rw [← neg_inj, neg_neg, Nat.cast_succ, Num.add_one, Num.zneg_toZNumNeg, Num.toZNum_succ,
  Nat.cast_succ, ZNum.add_one]
state_before: α : Type ?u.1057236
n : ℕ
⊢ Num.toZNumNeg ↑(n + 1) = -↑(n + 1)

tactic: rfl
state_before: α : Type ?u.1057236
n : ℕ
⊢ succ (Num.toZNum ↑n) = succ ↑n
Theorem: ENNReal.div_le_of_le_mul
File: Mathlib/Data/Real/ENNReal.lean

tactic: by_cases h0 : c = 0
state_before: α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
⊢ a / c ≤ b

tactic: by_cases hinf : c = ∞
state_before: case neg
α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : ¬c = 0
⊢ a / c ≤ b

tactic: exact (ENNReal.div_le_iff_le_mul (Or.inl h0) (Or.inl hinf)).2 h
state_before: case neg
α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : ¬c = 0
hinf : ¬c = ⊤
⊢ a / c ≤ b

tactic: have : a = 0 := by simpa [h0] using h
state_before: case pos
α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : c = 0
⊢ a / c ≤ b

tactic: simp [*]
state_before: case pos
α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : c = 0
this : a = 0
⊢ a / c ≤ b

tactic: simpa [h0] using h
state_before: α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : c = 0
⊢ a = 0

tactic: simp [hinf]
state_before: case pos
α : Type ?u.287943
β : Type ?u.287946
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : ¬c = 0
hinf : c = ⊤
⊢ a / c ≤ b
Theorem: NormedSpace.norm_le_dual_bound
File: Mathlib/Analysis/NormedSpace/Dual.lean

tactic: by_cases h : x = 0
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
M : ℝ
hMp : 0 ≤ M
hM : ∀ (f : Dual 𝕜 E), ‖↑f x‖ ≤ M * ‖f‖
⊢ ‖x‖ ≤ M

tactic: simp only [h, hMp, norm_zero]
state_before: case pos
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
M : ℝ
hMp : 0 ≤ M
hM : ∀ (f : Dual 𝕜 E), ‖↑f x‖ ≤ M * ‖f‖
h : x = 0
⊢ ‖x‖ ≤ M

tactic: obtain ⟨f, hf₁, hfx⟩ : ∃ f : E →L[𝕜] 𝕜, ‖f‖ = 1 ∧ f x = ‖x‖ := exists_dual_vector 𝕜 x h
state_before: case neg
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
M : ℝ
hMp : 0 ≤ M
hM : ∀ (f : Dual 𝕜 E), ‖↑f x‖ ≤ M * ‖f‖
h : ¬x = 0
⊢ ‖x‖ ≤ M

tactic: calc
  ‖x‖ = ‖(‖x‖ : 𝕜)‖ := IsROrC.norm_coe_norm.symm
  _ = ‖f x‖ := by rw [hfx]
  _ ≤ M * ‖f‖ := (hM f)
  _ = M := by rw [hf₁, mul_one]
state_before: case neg.intro.intro
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
M : ℝ
hMp : 0 ≤ M
hM : ∀ (f : Dual 𝕜 E), ‖↑f x‖ ≤ M * ‖f‖
h : ¬x = 0
f : E →L[𝕜] 𝕜
hf₁ : ‖f‖ = 1
hfx : ↑f x = ↑‖x‖
⊢ ‖x‖ ≤ M

tactic: rw [hfx]
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
M : ℝ
hMp : 0 ≤ M
hM : ∀ (f : Dual 𝕜 E), ‖↑f x‖ ≤ M * ‖f‖
h : ¬x = 0
f : E →L[𝕜] 𝕜
hf₁ : ‖f‖ = 1
hfx : ↑f x = ↑‖x‖
⊢ ‖↑‖x‖‖ = ‖↑f x‖

tactic: rw [hf₁, mul_one]
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
M : ℝ
hMp : 0 ≤ M
hM : ∀ (f : Dual 𝕜 E), ‖↑f x‖ ≤ M * ‖f‖
h : ¬x = 0
f : E →L[𝕜] 𝕜
hf₁ : ‖f‖ = 1
hfx : ↑f x = ↑‖x‖
⊢ M * ‖f‖ = M
Theorem: Nat.sub_le_sub_left
File: Std/Data/Nat/Lemmas.lean

tactic: rw [← Nat.sub_sub]
state_before: n m k a : Nat
h : n ≤ n + a
⊢ k - (n + a) ≤ k - n

tactic: apply sub_le
state_before: n m k a : Nat
h : n ≤ n + a
⊢ k - n - a ≤ k - n
Theorem: DirectSum.linearEquivFunOnFintype_symm_single
File: Mathlib/Algebra/DirectSum/Module.lean

tactic: change (Dfinsupp.equivFunOnFintype.symm (Pi.single i m)) = _
state_before: R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ ↑(LinearEquiv.symm (linearEquivFunOnFintype R ι M)) (Pi.single i m) = ↑(lof R ι M i) m

tactic: rw [Dfinsupp.equivFunOnFintype_symm_single i m]
state_before: R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ ↑Dfinsupp.equivFunOnFintype.symm (Pi.single i m) = ↑(lof R ι M i) m

tactic: rfl
state_before: R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ Dfinsupp.single i m = ↑(lof R ι M i) m
Theorem: isClosed_setOf_map_smul
File: Mathlib/Topology/Algebra/ConstMulAction.lean

tactic: simp only [Set.setOf_forall]
state_before: M : Type u_4
α✝ : Type ?u.23804
β✝ : Type ?u.23807
inst✝⁹ : TopologicalSpace α✝
inst✝⁸ : Monoid M
inst✝⁷ : MulAction M α✝
inst✝⁶ : ContinuousConstSMul M α✝
N : Type u_1
inst✝⁵ : Monoid N
α : Type u_2
β : Type u_3
inst✝⁴ : MulAction M α
inst✝³ : MulAction N β
inst✝² : TopologicalSpace β
inst✝¹ : T2Space β
inst✝ : ContinuousConstSMul N β
σ : M → N
⊢ IsClosed {f | ∀ (c : M) (x : α), f (c • x) = σ c • f x}

tactic: exact isClosed_iInter fun c => isClosed_iInter fun x =>
  isClosed_eq (continuous_apply _) ((continuous_apply _).const_smul _)
state_before: M : Type u_4
α✝ : Type ?u.23804
β✝ : Type ?u.23807
inst✝⁹ : TopologicalSpace α✝
inst✝⁸ : Monoid M
inst✝⁷ : MulAction M α✝
inst✝⁶ : ContinuousConstSMul M α✝
N : Type u_1
inst✝⁵ : Monoid N
α : Type u_2
β : Type u_3
inst✝⁴ : MulAction M α
inst✝³ : MulAction N β
inst✝² : TopologicalSpace β
inst✝¹ : T2Space β
inst✝ : ContinuousConstSMul N β
σ : M → N
⊢ IsClosed (⋂ (i : M) (i_1 : α), {x | x (i • i_1) = σ i • x i_1})
Theorem: Option.map₂_assoc
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> cases c <;> simp [h_assoc]
state_before: α : Type u_5
β : Type u_6
γ : Type u_4
f✝ : α → β → γ
a : Option α
b : Option β
c : Option γ
δ : Type u_1
ε : Type u_2
ε' : Type u_3
f : δ → γ → ε
g : α → β → δ
f' : α → ε' → ε
g' : β → γ → ε'
h_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)
⊢ map₂ f (map₂ g a b) c = map₂ f' a (map₂ g' b c)
Theorem: CategoryTheory.strongMono_of_strongMono
File: Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean

tactic: intros
state_before: C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
⊢ ∀ [inst : Epi z], HasLiftingProperty z f

tactic: constructor
state_before: C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
⊢ HasLiftingProperty z f

tactic: intro u v sq
state_before: case sq_hasLift
C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
⊢ ∀ {f_1 : X ⟶ P} {g : Y ⟶ Q} (sq : CommSq f_1 z f g), CommSq.HasLift sq

tactic: have h₀ : u ≫ f ≫ g = z ≫ v ≫ g := by
  rw [←Category.assoc, eq_whisker sq.w, Category.assoc]
state_before: case sq_hasLift
C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
u : X ⟶ P
v : Y ⟶ Q
sq : CommSq u z f v
⊢ CommSq.HasLift sq

tactic: exact CommSq.HasLift.mk' ⟨(CommSq.mk h₀).lift, by simp, by simp [← cancel_epi z, sq.w]⟩
state_before: case sq_hasLift
C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
u : X ⟶ P
v : Y ⟶ Q
sq : CommSq u z f v
h₀ : u ≫ f ≫ g = z ≫ v ≫ g
⊢ CommSq.HasLift sq

tactic: rw [←Category.assoc, eq_whisker sq.w, Category.assoc]
state_before: C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
u : X ⟶ P
v : Y ⟶ Q
sq : CommSq u z f v
⊢ u ≫ f ≫ g = z ≫ v ≫ g

tactic: simp
state_before: C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
u : X ⟶ P
v : Y ⟶ Q
sq : CommSq u z f v
h₀ : u ≫ f ≫ g = z ≫ v ≫ g
⊢ z ≫ CommSq.lift (_ : CommSq u z (f ≫ g) (v ≫ g)) = u

tactic: simp [← cancel_epi z, sq.w]
state_before: C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono (f ≫ g)
X Y : C
z : X ⟶ Y
inst✝ : Epi z
u : X ⟶ P
v : Y ⟶ Q
sq : CommSq u z f v
h₀ : u ≫ f ≫ g = z ≫ v ≫ g
⊢ CommSq.lift (_ : CommSq u z (f ≫ g) (v ≫ g)) ≫ f = v
Theorem: Submodule.fg_def
File: Mathlib/RingTheory/Finiteness.lean

tactic: rintro ⟨t', h, rfl⟩
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ S, Set.Finite S ∧ span R S = N) → FG N

tactic: rcases Finite.exists_finset_coe h with ⟨t, rfl⟩
state_before: case intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
t' : Set M
h : Set.Finite t'
⊢ FG (span R t')

tactic: exact ⟨t, rfl⟩
state_before: case intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
t : Finset M
h : Set.Finite ↑t
⊢ FG (span R ↑t)
Theorem: SimpleGraph.dist_eq_zero_iff_eq_or_not_reachable
File: Mathlib/Combinatorics/SimpleGraph/Metric.lean

tactic: simp [dist, Nat.sInf_eq_zero, Reachable]
state_before: V : Type u_1
G : SimpleGraph V
u v : V
⊢ dist G u v = 0 ↔ u = v ∨ ¬Reachable G u v
Theorem: List.Perm.length_eq
File: Mathlib/Data/List/Perm.lean

tactic: simp [r]
state_before: α : Type uu
β : Type vv
l₁✝¹ l₂✝¹ l₁✝ l₂✝ : List α
p : l₁✝ ~ l₂✝
_x : α
l₁ l₂ : List α
_p : l₁ ~ l₂
r : length l₁ = length l₂
⊢ length (_x :: l₁) = length (_x :: l₂)

tactic: simp
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ l₁ l₂ : List α
p : l₁ ~ l₂
_x _y : α
l : List α
⊢ length (_y :: _x :: l) = length (_x :: _y :: l)
Theorem: Multiset.induction
File: Mathlib/Data/Multiset/Basic.lean

tactic: rintro ⟨l⟩
state_before: α : Type u_1
β : Type ?u.12839
γ : Type ?u.12842
p : Multiset α → Prop
empty : p 0
cons : ∀ ⦃a : α⦄ {s : Multiset α}, p s → p (a ::ₘ s)
⊢ ∀ (s : Multiset α), p s

tactic: induction' l with _ _ ih <;> [exact empty; exact cons ih]
state_before: case mk
α : Type u_1
β : Type ?u.12839
γ : Type ?u.12842
p : Multiset α → Prop
empty : p 0
cons : ∀ ⦃a : α⦄ {s : Multiset α}, p s → p (a ::ₘ s)
s✝ : Multiset α
l : List α
⊢ p (Quot.mk Setoid.r l)
Theorem: Pi.lt_toLex_update_self_iff
File: Mathlib/Data/Pi/Lex.lean

tactic: refine' ⟨_, fun h => toLex_strictMono <| lt_update_self_iff.2 h⟩
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
⊢ ↑toLex x < ↑toLex (update x i a) ↔ x i < a

tactic: rintro ⟨j, hj, h⟩
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
⊢ ↑toLex x < ↑toLex (update x i a) → x i < a

tactic: dsimp at h
state_before: case intro.intro
ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
j : ι
hj : ∀ (j_1 : ι), (fun x x_1 => x < x_1) j_1 j → ↑toLex x j_1 = ↑toLex (update x i a) j_1
h : ↑toLex x j < ↑toLex (update x i a) j
⊢ x i < a

tactic: obtain rfl : j = i := by
  by_contra H
  rw [update_noteq H] at h
  exact h.false
state_before: case intro.intro
ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
j : ι
hj : ∀ (j_1 : ι), (fun x x_1 => x < x_1) j_1 j → ↑toLex x j_1 = ↑toLex (update x i a) j_1
h : x j < update x i a j
⊢ x i < a

tactic: rwa [update_same] at h
state_before: case intro.intro
ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
j : ι
a : β j
hj : ∀ (j_1 : ι), (fun x x_1 => x < x_1) j_1 j → ↑toLex x j_1 = ↑toLex (update x j a) j_1
h : x j < update x j a j
⊢ x j < a

tactic: by_contra H
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
j : ι
hj : ∀ (j_1 : ι), (fun x x_1 => x < x_1) j_1 j → ↑toLex x j_1 = ↑toLex (update x i a) j_1
h : x j < update x i a j
⊢ j = i

tactic: rw [update_noteq H] at h
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
j : ι
hj : ∀ (j_1 : ι), (fun x x_1 => x < x_1) j_1 j → ↑toLex x j_1 = ↑toLex (update x i a) j_1
h : x j < update x i a j
H : ¬j = i
⊢ False

tactic: exact h.false
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : LinearOrder ι
inst✝¹ : IsWellOrder ι fun x x_1 => x < x_1
inst✝ : (i : ι) → PartialOrder (β i)
x y : (i : ι) → β i
i : ι
a : β i
j : ι
hj : ∀ (j_1 : ι), (fun x x_1 => x < x_1) j_1 j → ↑toLex x j_1 = ↑toLex (update x i a) j_1
h : x j < x j
H : ¬j = i
⊢ False
Theorem: Set.Finite.prod
File: Mathlib/Data/Set/Finite.lean

tactic: cases hs
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
hs : Set.Finite s
ht : Set.Finite t
⊢ Set.Finite (s ×ˢ t)

tactic: cases ht
state_before: case intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
ht : Set.Finite t
a✝ : Fintype ↑s
⊢ Set.Finite (s ×ˢ t)

tactic: apply toFinite
state_before: case intro.intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
a✝¹ : Fintype ↑s
a✝ : Fintype ↑t
⊢ Set.Finite (s ×ˢ t)
Theorem: Matrix.scalar_apply_ne
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp only [h, coe_scalar, one_apply_ne, Ne.def, not_false_iff, Matrix.smul_apply, smul_zero]
state_before: l : Type ?u.445575
m : Type ?u.445578
n : Type u_1
o : Type ?u.445584
m' : o → Type ?u.445589
n' : o → Type ?u.445594
R : Type ?u.445597
S : Type ?u.445600
α : Type v
β : Type w
γ : Type ?u.445607
inst✝² : Semiring α
inst✝¹ : DecidableEq n
inst✝ : Fintype n
a : α
i j : n
h : i ≠ j
⊢ ↑(scalar n) a i j = 0
Theorem: MeasureTheory.set_integral_trim
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rwa [integral_trim hm hf_meas, restrict_trim hm μ]
state_before: α✝ : Type ?u.268461
β : Type ?u.268464
E : Type u_2
F : Type ?u.268470
inst✝³ : MeasurableSpace α✝
inst✝² : NormedAddCommGroup E
f✝ g : α✝ → E
s✝ t : Set α✝
μ✝ ν : Measure α✝
l l' : Filter α✝
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
f : α → E
hf_meas : StronglyMeasurable f
s : Set α
hs : MeasurableSet s
⊢ (∫ (x : α) in s, f x ∂μ) = ∫ (x : α) in s, f x ∂Measure.trim μ hm
Theorem: FiniteDimensional.finrank_eq_card_basis'
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: haveI : IsNoetherian K V := iff_fg.2 inferInstance
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
ι : Type w
h : Basis ι K V
⊢ ↑(finrank K V) = (#ι)

tactic: haveI : Fintype ι := fintypeBasisIndex h
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
ι : Type w
h : Basis ι K V
this : IsNoetherian K V
⊢ ↑(finrank K V) = (#ι)

tactic: rw [Cardinal.mk_fintype, finrank_eq_card_basis h]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
ι : Type w
h : Basis ι K V
this✝ : IsNoetherian K V
this : Fintype ι
⊢ ↑(finrank K V) = (#ι)
Theorem: NNReal.rpow_sum_le_const_mul_sum_rpow
File: Mathlib/Analysis/MeanInequalities.lean

tactic: cases' eq_or_lt_of_le hp with hp hp
state_before: ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp : 1 ≤ p
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: let q : ℝ := p / (p - 1)
state_before: case inr
ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: have hpq : p.IsConjugateExponent q := by rw [Real.isConjugateExponent_iff hp]
state_before: case inr
ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: have hp₁ : 1 / p * p = 1 := one_div_mul_cancel hpq.ne_zero
state_before: case inr
ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
hpq : Real.IsConjugateExponent p q
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: have hq : 1 / q * p = p - 1 := by
  rw [← hpq.div_conj_eq_sub_one]
  ring
state_before: case inr
ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
hpq : Real.IsConjugateExponent p q
hp₁ : 1 / p * p = 1
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: simpa only [NNReal.mul_rpow, ← NNReal.rpow_mul, hp₁, hq, one_mul, one_rpow, rpow_one,
  Pi.one_apply, sum_const, Nat.smul_one_eq_coe] using
  NNReal.rpow_le_rpow (inner_le_Lp_mul_Lq s 1 f hpq.symm) hpq.nonneg
state_before: case inr
ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
hpq : Real.IsConjugateExponent p q
hp₁ : 1 / p * p = 1
hq : 1 / q * p = p - 1
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: simp [← hp]
state_before: case inl
ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 = p
⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p

tactic: rw [Real.isConjugateExponent_iff hp]
state_before: ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
⊢ Real.IsConjugateExponent p q

tactic: rw [← hpq.div_conj_eq_sub_one]
state_before: ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
hpq : Real.IsConjugateExponent p q
hp₁ : 1 / p * p = 1
⊢ 1 / q * p = p - 1

tactic: ring
state_before: ι : Type u
s : Finset ι
f : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
q : ℝ := p / (p - 1)
hpq : Real.IsConjugateExponent p q
hp₁ : 1 / p * p = 1
⊢ 1 / q * p = p / q
Theorem: Finsupp.mem_support_single
File: Mathlib/Data/Finsupp/Defs.lean

tactic: simp [single_apply_eq_zero, not_or]
state_before: α : Type u_1
β : Type ?u.52813
γ : Type ?u.52816
ι : Type ?u.52819
M : Type u_2
M' : Type ?u.52825
N : Type ?u.52828
P : Type ?u.52831
G : Type ?u.52834
H : Type ?u.52837
R : Type ?u.52840
S : Type ?u.52843
inst✝ : Zero M
a✝ a'✝ : α
b✝ : M
a a' : α
b : M
⊢ a ∈ (single a' b).support ↔ a = a' ∧ b ≠ 0