tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.Lp.continuous_negPart
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: have eq : (fun f : Lp ℝ p μ => negPart f) = fun f : Lp ℝ p μ => posPart (-f) := rfl
state_before: α : Type u_1
E : Type ?u.8098806
F : Type ?u.8098809
G : Type ?u.8098812
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
inst✝ : Fact (1 ≤ p)
⊢ Continuous fun f => negPart f

tactic: rw [eq]
state_before: α : Type u_1
E : Type ?u.8098806
F : Type ?u.8098809
G : Type ?u.8098812
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
inst✝ : Fact (1 ≤ p)
eq : (fun f => negPart f) = fun f => posPart (-f)
⊢ Continuous fun f => negPart f

tactic: exact continuous_posPart.comp continuous_neg
state_before: α : Type u_1
E : Type ?u.8098806
F : Type ?u.8098809
G : Type ?u.8098812
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
inst✝ : Fact (1 ≤ p)
eq : (fun f => negPart f) = fun f => posPart (-f)
⊢ Continuous fun f => posPart (-f)
Theorem: min_lt_min_left_iff
File: Mathlib/Order/MinMax.lean

tactic: simp_rw [lt_min_iff, min_lt_iff, or_iff_left (lt_irrefl _)]
state_before: α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ min a c < min b c ↔ a < b ∧ a < c

tactic: exact and_congr_left fun h => or_iff_left_of_imp h.trans
state_before: α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ (a < b ∨ c < b) ∧ a < c ↔ a < b ∧ a < c
Theorem: Finset.nonMemberSubfamily_nonMemberSubfamily
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: ext
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
⊢ nonMemberSubfamily a (nonMemberSubfamily a 𝒜) = nonMemberSubfamily a 𝒜

tactic: simp
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
a✝ : Finset α
⊢ a✝ ∈ nonMemberSubfamily a (nonMemberSubfamily a 𝒜) ↔ a✝ ∈ nonMemberSubfamily a 𝒜
Theorem: List.count_pos
File: Mathlib/Data/List/Count.lean

tactic: simp only [count, countp_pos, beq_iff_eq, exists_eq_right]
state_before: α : Type u_1
l✝ : List α
inst✝ : DecidableEq α
a : α
l : List α
⊢ 0 < count a l ↔ a ∈ l
Theorem: Set.offDiag_union
File: Mathlib/Data/Set/Prod.lean

tactic: ext x
state_before: α : Type u_1
s t : Set α
x : α × α
a : α
h : Disjoint s t
⊢ offDiag (s ∪ t) = offDiag s ∪ offDiag t ∪ s ×ˢ t ∪ t ×ˢ s

tactic: simp only [mem_offDiag, mem_union, ne_eq, mem_prod]
state_before: case h
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
⊢ x ∈ offDiag (s ∪ t) ↔ x ∈ offDiag s ∪ offDiag t ∪ s ×ˢ t ∪ t ×ˢ s

tactic: constructor
state_before: case h
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
⊢ (x.fst ∈ s ∨ x.fst ∈ t) ∧ (x.snd ∈ s ∨ x.snd ∈ t) ∧ ¬x.fst = x.snd ↔
    ((x.fst ∈ s ∧ x.snd ∈ s ∧ ¬x.fst = x.snd ∨ x.fst ∈ t ∧ x.snd ∈ t ∧ ¬x.fst = x.snd) ∨ x.fst ∈ s ∧ x.snd ∈ t) ∨
      x.fst ∈ t ∧ x.snd ∈ s

tactic: rintro ⟨h0|h0, h1|h1, h2⟩ <;> simp [h0, h1, h2]
state_before: case h.mp
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
⊢ (x.fst ∈ s ∨ x.fst ∈ t) ∧ (x.snd ∈ s ∨ x.snd ∈ t) ∧ ¬x.fst = x.snd →
    ((x.fst ∈ s ∧ x.snd ∈ s ∧ ¬x.fst = x.snd ∨ x.fst ∈ t ∧ x.snd ∈ t ∧ ¬x.fst = x.snd) ∨ x.fst ∈ s ∧ x.snd ∈ t) ∨
      x.fst ∈ t ∧ x.snd ∈ s

tactic: rintro (((⟨h0, h1, h2⟩|⟨h0, h1, h2⟩)|⟨h0, h1⟩)|⟨h0, h1⟩) <;> simp [*]
state_before: case h.mpr
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
⊢ ((x.fst ∈ s ∧ x.snd ∈ s ∧ ¬x.fst = x.snd ∨ x.fst ∈ t ∧ x.snd ∈ t ∧ ¬x.fst = x.snd) ∨ x.fst ∈ s ∧ x.snd ∈ t) ∨
      x.fst ∈ t ∧ x.snd ∈ s →
    (x.fst ∈ s ∨ x.fst ∈ t) ∧ (x.snd ∈ s ∨ x.snd ∈ t) ∧ ¬x.fst = x.snd

tactic: rintro h3
state_before: case h.mpr.inl.inr.intro
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
h0 : x.fst ∈ s
h1 : x.snd ∈ t
⊢ ¬x.fst = x.snd

tactic: rw [h3] at h0
state_before: case h.mpr.inl.inr.intro
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
h0 : x.fst ∈ s
h1 : x.snd ∈ t
h3 : x.fst = x.snd
⊢ False

tactic: exact (Set.disjoint_left.mp h h0 h1)
state_before: case h.mpr.inl.inr.intro
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
h0 : x.snd ∈ s
h1 : x.snd ∈ t
h3 : x.fst = x.snd
⊢ False

tactic: rintro h3
state_before: case h.mpr.inr.intro
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
h0 : x.fst ∈ t
h1 : x.snd ∈ s
⊢ ¬x.fst = x.snd

tactic: rw [h3] at h0
state_before: case h.mpr.inr.intro
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
h0 : x.fst ∈ t
h1 : x.snd ∈ s
h3 : x.fst = x.snd
⊢ False

tactic: exact (Set.disjoint_right.mp h h0 h1).elim
state_before: case h.mpr.inr.intro
α : Type u_1
s t : Set α
x✝ : α × α
a : α
h : Disjoint s t
x : α × α
h0 : x.snd ∈ t
h1 : x.snd ∈ s
h3 : x.fst = x.snd
⊢ False
Theorem: fderiv_inner_apply
File: Mathlib/Analysis/InnerProductSpace/Calculus.lean

tactic: rw [(hf.hasFDerivAt.inner 𝕜 hg.hasFDerivAt).fderiv]
state_before: 𝕜 : Type u_3
E : Type u_2
F : Type ?u.93572
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : NormedSpace ℝ E
G : Type u_1
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
f g : G → E
f' g' : G →L[ℝ] E
s : Set G
x : G
n : ℕ∞
hf : DifferentiableAt ℝ f x
hg : DifferentiableAt ℝ g x
y : G
⊢ ↑(fderiv ℝ (fun t => inner (f t) (g t)) x) y = inner (f x) (↑(fderiv ℝ g x) y) + inner (↑(fderiv ℝ f x) y) (g x)

tactic: rfl
state_before: 𝕜 : Type u_3
E : Type u_2
F : Type ?u.93572
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : NormedSpace ℝ E
G : Type u_1
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
f g : G → E
f' g' : G →L[ℝ] E
s : Set G
x : G
n : ℕ∞
hf : DifferentiableAt ℝ f x
hg : DifferentiableAt ℝ g x
y : G
⊢ ↑(ContinuousLinearMap.comp (fderivInnerClm 𝕜 (f x, g x)) (ContinuousLinearMap.prod (fderiv ℝ f x) (fderiv ℝ g x))) y =
    inner (f x) (↑(fderiv ℝ g x) y) + inner (↑(fderiv ℝ f x) y) (g x)
Theorem: NormedAddGroupHom.completion_toCompl
File: Mathlib/Analysis/Normed/Group/HomCompletion.lean

tactic: ext x
state_before: G : Type u_1
inst✝² : SeminormedAddCommGroup G
H : Type u_2
inst✝¹ : SeminormedAddCommGroup H
K : Type ?u.12924
inst✝ : SeminormedAddCommGroup K
f : NormedAddGroupHom G H
⊢ NormedAddGroupHom.comp (completion f) toCompl = NormedAddGroupHom.comp toCompl f

tactic: simp
state_before: case H
G : Type u_1
inst✝² : SeminormedAddCommGroup G
H : Type u_2
inst✝¹ : SeminormedAddCommGroup H
K : Type ?u.12924
inst✝ : SeminormedAddCommGroup K
f : NormedAddGroupHom G H
x : G
⊢ ↑(NormedAddGroupHom.comp (completion f) toCompl) x = ↑(NormedAddGroupHom.comp toCompl f) x
Theorem: CategoryTheory.leftAdjointMate_id
File: Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean

tactic: simp only [leftAdjointMate, MonoidalCategory.tensor_id, Category.id_comp,
  evaluation_coevaluation_assoc, Category.comp_id, Iso.inv_hom_id]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
X : C
inst✝ : HasLeftDual X
⊢ (ᘁ𝟙 X) = 𝟙 ᘁX
Theorem: Primrec.list_append
File: Mathlib/Computability/Primrec.lean

tactic: induction l₁ <;> simp [*]
state_before: α : Type u_1
β : Type ?u.309365
γ : Type ?u.309368
σ : Type ?u.309371
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
l₁ l₂ : List α
⊢ List.foldr (fun b s => ((l₁, l₂), b, s).snd.fst :: ((l₁, l₂), b, s).snd.snd) (l₁, l₂).snd (l₁, l₂).fst = l₁ ++ l₂
Theorem: Module.isTorsionBySet_singleton_iff
File: Mathlib/Algebra/Module/Torsion.lean

tactic: refine' ⟨fun h x => @h _ ⟨_, Set.mem_singleton _⟩, fun h x => _⟩
state_before: R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
a : R
⊢ IsTorsionBySet R M {a} ↔ IsTorsionBy R M a

tactic: rintro ⟨b, rfl : b = a⟩
state_before: R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
a : R
h : IsTorsionBy R M a
x : M
⊢ ∀ ⦃a_1 : ↑{a}⦄, ↑a_1 • x = 0

tactic: exact @h _
state_before: case mk
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
x : M
b : R
h : IsTorsionBy R M b
⊢ ↑{ val := b, property := (_ : b = b) } • x = 0
Theorem: Polynomial.reverse_mul
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: unfold reverse
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f g : R[X]
fg : leadingCoeff f * leadingCoeff g ≠ 0
⊢ reverse (f * g) = reverse f * reverse g

tactic: rw [natDegree_mul' fg, reflect_mul f g rfl.le rfl.le]
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f g : R[X]
fg : leadingCoeff f * leadingCoeff g ≠ 0
⊢ reflect (natDegree (f * g)) (f * g) = reflect (natDegree f) f * reflect (natDegree g) g
Theorem: CategoryTheory.GrothendieckTopology.Subpresheaf.to_sheafify_lift_unique
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

tactic: ext (U⟨s, hs⟩)
state_before: C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
h : Presieve.IsSheaf J F'
l₁ l₂ : toPresheaf (sheafify J G) ⟶ F'
e : homOfLe (_ : G ≤ sheafify J G) ≫ l₁ = homOfLe (_ : G ≤ sheafify J G) ≫ l₂
⊢ l₁ = l₂

tactic: apply (h _ hs).isSeparatedFor.ext
state_before: case w.h.h.mk
C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
h : Presieve.IsSheaf J F'
l₁ l₂ : toPresheaf (sheafify J G) ⟶ F'
e : homOfLe (_ : G ≤ sheafify J G) ≫ l₁ = homOfLe (_ : G ≤ sheafify J G) ≫ l₂
U : Cᵒᵖ
s : F.obj U
hs : s ∈ obj (sheafify J G) U
⊢ l₁.app U { val := s, property := hs } = l₂.app U { val := s, property := hs }

tactic: rintro V i hi
state_before: case w.h.h.mk
C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
h : Presieve.IsSheaf J F'
l₁ l₂ : toPresheaf (sheafify J G) ⟶ F'
e : homOfLe (_ : G ≤ sheafify J G) ≫ l₁ = homOfLe (_ : G ≤ sheafify J G) ≫ l₂
U : Cᵒᵖ
s : F.obj U
hs : s ∈ obj (sheafify J G) U
⊢ ∀ ⦃Y : C⦄ ⦃f : Y ⟶ U.unop⦄,
    (sieveOfSection G s).arrows f →
      F'.map f.op (l₁.app U { val := s, property := hs }) = F'.map f.op (l₂.app U { val := s, property := hs })

tactic: dsimp at hi
state_before: case w.h.h.mk
C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
h : Presieve.IsSheaf J F'
l₁ l₂ : toPresheaf (sheafify J G) ⟶ F'
e : homOfLe (_ : G ≤ sheafify J G) ≫ l₁ = homOfLe (_ : G ≤ sheafify J G) ≫ l₂
U : Cᵒᵖ
s : F.obj U
hs : s ∈ obj (sheafify J G) U
V : C
i : V ⟶ U.unop
hi : (sieveOfSection G s).arrows i
⊢ F'.map i.op (l₁.app U { val := s, property := hs }) = F'.map i.op (l₂.app U { val := s, property := hs })

tactic: erw [← FunctorToTypes.naturality, ← FunctorToTypes.naturality]
state_before: case w.h.h.mk
C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
h : Presieve.IsSheaf J F'
l₁ l₂ : toPresheaf (sheafify J G) ⟶ F'
e : homOfLe (_ : G ≤ sheafify J G) ≫ l₁ = homOfLe (_ : G ≤ sheafify J G) ≫ l₂
U : Cᵒᵖ
s : F.obj U
hs : s ∈ obj (sheafify J G) U
V : C
i : V ⟶ U.unop
hi : F.map i.op s ∈ obj G V.op
⊢ F'.map i.op (l₁.app U { val := s, property := hs }) = F'.map i.op (l₂.app U { val := s, property := hs })

tactic: exact (congr_fun (congr_app e <| op V) ⟨_, hi⟩ : _)
state_before: case w.h.h.mk
C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
h : Presieve.IsSheaf J F'
l₁ l₂ : toPresheaf (sheafify J G) ⟶ F'
e : homOfLe (_ : G ≤ sheafify J G) ≫ l₁ = homOfLe (_ : G ≤ sheafify J G) ≫ l₂
U : Cᵒᵖ
s : F.obj U
hs : s ∈ obj (sheafify J G) U
V : C
i : V ⟶ U.unop
hi : F.map i.op s ∈ obj G V.op
⊢ l₁.app V.op ((toPresheaf (sheafify J G)).map i.op { val := s, property := hs }) =
    l₂.app V.op ((toPresheaf (sheafify J G)).map i.op { val := s, property := hs })
Theorem: Partrec.comp
File: Mathlib/Computability/Partrec.lean

tactic: simp
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.77801
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : β →. σ
g : α → β
hf : Partrec f
hg : Computable g
n : ℕ
⊢ (do
      let n ← Part.bind ↑(decode n) fun a => Part.map encode (↑g a)
      Part.bind ↑(decode n) fun a => Part.map encode (f a)) =
    Part.bind ↑(decode n) fun a => Part.map encode ((fun a => f (g a)) a)

tactic: cases' e : decode (α := α) n with a <;> simp [e, encodek]
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.77801
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : β →. σ
g : α → β
hf : Partrec f
hg : Computable g
n : ℕ
⊢ (Part.bind (Part.bind ↑(decode n) fun a => Part.some (encode (g a))) fun n =>
      Part.bind ↑(decode n) fun a => Part.map encode (f a)) =
    Part.bind ↑(decode n) fun a => Part.map encode (f (g a))
Theorem: intervalIntegral.integral_non_aestronglyMeasurable
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: rw [intervalIntegral_eq_integral_uIoc, integral_non_aestronglyMeasurable hf, smul_zero]
state_before: ι : Type ?u.11229466
𝕜 : Type ?u.11229469
E : Type u_1
F : Type ?u.11229475
A : Type ?u.11229478
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b : ℝ
f g : ℝ → E
μ : MeasureTheory.Measure ℝ
hf : ¬AEStronglyMeasurable f (Measure.restrict μ (Ι a b))
⊢ (∫ (x : ℝ) in a..b, f x ∂μ) = 0
Theorem: Nat.exists_mul_self'
File: Mathlib/Data/Nat/Sqrt.lean

tactic: simpa only [pow_two] using exists_mul_self x
state_before: x : ℕ
⊢ (∃ n, n ^ 2 = x) ↔ sqrt x ^ 2 = x
Theorem: Nat.dvd_of_pow_dvd
File: Mathlib/Data/Nat/Pow.lean

tactic: rw [← pow_one p]
state_before: p k m : ℕ
hk : 1 ≤ k
hpk : p ^ k ∣ m
⊢ p ∣ m

tactic: exact pow_dvd_of_le_of_pow_dvd hk hpk
state_before: p k m : ℕ
hk : 1 ≤ k
hpk : p ^ k ∣ m
⊢ p ^ 1 ∣ m
Theorem: Module.eq_zero_of_zero_eq_one
File: Mathlib/Algebra/Module/Basic.lean

tactic: rw [← one_smul R x, ← zero_eq_one, zero_smul]
state_before: α : Type ?u.65153
R : Type u_1
k : Type ?u.65159
S : Type ?u.65162
M : Type u_2
M₂ : Type ?u.65168
M₃ : Type ?u.65171
ι : Type ?u.65174
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r s : R
x y : M
zero_eq_one : 0 = 1
⊢ x = 0
Theorem: Finset.abs_sum_of_nonneg'
File: Mathlib/Algebra/BigOperators/Order.lean

tactic: rw [abs_of_nonneg (Finset.sum_nonneg' hf)]
state_before: ι : Type u_2
α : Type ?u.95199
β : Type ?u.95202
M : Type ?u.95205
N : Type ?u.95208
G✝ : Type ?u.95211
k : Type ?u.95214
R : Type ?u.95217
G : Type u_1
inst✝ : LinearOrderedAddCommGroup G
f : ι → G
s : Finset ι
hf : ∀ (i : ι), 0 ≤ f i
⊢ abs (∑ i in s, f i) = ∑ i in s, f i
Theorem: Set.prod_range_range_eq
File: Mathlib/Data/Set/Prod.lean

tactic: simp [range]
state_before: α : Type u_3
β : Type u_4
γ : Type u_1
δ : Type u_2
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
m₁ : α → γ
m₂ : β → δ
⊢ ∀ (x : γ × δ), x ∈ range m₁ ×ˢ range m₂ ↔ x ∈ range fun p => (m₁ p.fst, m₂ p.snd)
Theorem: Set.surjOn_iff_exists_map_subtype
File: Mathlib/Data/Set/Function.lean

tactic: rw [hfg, hx, Subtype.coe_mk]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.38868
ι : Sort ?u.38871
π : α → Type ?u.38876
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g✝ g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
x✝ : ∃ t' g, t ⊆ t' ∧ Surjective g ∧ ∀ (x : ↑s), f ↑x = ↑(g x)
y : β
hy : y ∈ t
t' : Set β
g : ↑s → ↑t'
htt' : t ⊆ t'
hg : Surjective g
hfg : ∀ (x : ↑s), f ↑x = ↑(g x)
x : ↑s
hx : g x = { val := y, property := (_ : y ∈ t') }
⊢ f ↑x = y
Theorem: Finsupp.multinomial_update
File: Mathlib/Data/Nat/Choose/Multinomial.lean

tactic: simp only [multinomial_eq]
state_before: α : Type u_1
a : α
f : α →₀ ℕ
⊢ multinomial f = choose (sum f fun x => id) (↑f a) * multinomial (update f a 0)

tactic: by_cases a ∈ f.support
state_before: α : Type u_1
a : α
f : α →₀ ℕ
⊢ Nat.multinomial f.support ↑f =
    choose (sum f fun x => id) (↑f a) * Nat.multinomial (update f a 0).support ↑(update f a 0)

tactic: rw [not_mem_support_iff] at h
state_before: case neg
α : Type u_1
a : α
f : α →₀ ℕ
h : ¬a ∈ f.support
⊢ Nat.multinomial f.support ↑f =
    choose (sum f fun x => id) (↑f a) * Nat.multinomial (update f a 0).support ↑(update f a 0)

tactic: rw [h, Nat.choose_zero_right, one_mul, ← h, update_self]
state_before: case neg
α : Type u_1
a : α
f : α →₀ ℕ
h : ↑f a = 0
⊢ Nat.multinomial f.support ↑f =
    choose (sum f fun x => id) (↑f a) * Nat.multinomial (update f a 0).support ↑(update f a 0)

tactic: rw [← Finset.insert_erase h, Nat.multinomial_insert _ f (Finset.not_mem_erase a _),
  Finset.add_sum_erase _ f h, support_update_zero]
state_before: case pos
α : Type u_1
a : α
f : α →₀ ℕ
h : a ∈ f.support
⊢ Nat.multinomial f.support ↑f =
    choose (sum f fun x => id) (↑f a) * Nat.multinomial (update f a 0).support ↑(update f a 0)

tactic: congr 1
state_before: case pos
α : Type u_1
a : α
f : α →₀ ℕ
h : a ∈ f.support
⊢ choose (∑ x in f.support, ↑f x) (↑f a) * Nat.multinomial (Finset.erase f.support a) ↑f =
    choose (sum f fun x => id) (↑f a) * Nat.multinomial (Finset.erase f.support a) ↑(update f a 0)

tactic: exact
  Nat.multinomial_congr _ fun _ h => (Function.update_noteq (Finset.mem_erase.1 h).1 0 f).symm
state_before: case pos.e_a
α : Type u_1
a : α
f : α →₀ ℕ
h : a ∈ f.support
⊢ Nat.multinomial (Finset.erase f.support a) ↑f = Nat.multinomial (Finset.erase f.support a) ↑(update f a 0)
Theorem: Multiset.Icc_eq_zero_iff
File: Mathlib/Data/Multiset/LocallyFinite.lean

tactic: rw [Icc, Finset.val_eq_zero, Finset.Icc_eq_empty_iff]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ Icc a b = 0 ↔ ¬a ≤ b
Theorem: Cardinal.lift_le_continuum
File: Mathlib/SetTheory/Cardinal/Continuum.lean

tactic: rw [← lift_continuum.{u,v}, lift_le]
state_before: c : Cardinal
⊢ lift c ≤ 𝔠 ↔ c ≤ 𝔠
Theorem: Polynomial.degree_le_of_dvd
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rcases h1 with ⟨q, rfl⟩
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h1 : p ∣ q
h2 : q ≠ 0
⊢ degree p ≤ degree q

tactic: rw [mul_ne_zero_iff] at h2
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h2 : p * q ≠ 0
⊢ degree p ≤ degree (p * q)

tactic: exact degree_le_mul_left p h2.2
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h2 : p ≠ 0 ∧ q ≠ 0
⊢ degree p ≤ degree (p * q)
Theorem: SimpleGraph.deleteFar_iff
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: refine' ⟨fun h H hHG hH => _, fun h s hs hG => _⟩
state_before: ι : Sort ?u.169924
𝕜 : Type u_1
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝⁴ : OrderedRing 𝕜
inst✝³ : Fintype V
inst✝² : Fintype (Sym2 V)
inst✝¹ : DecidableEq V
inst✝ : DecidableRel G.Adj
p : SimpleGraph V → Prop
r r₁ r₂ : 𝕜
⊢ DeleteFar G p r ↔ ∀ ⦃H : SimpleGraph V⦄, H ≤ G → p H → r ≤ ↑(card (edgeFinset G)) - ↑(card (edgeFinset H))

tactic: have := h (sdiff_subset G.edgeFinset H.edgeFinset)
state_before: case refine'_1
ι : Sort ?u.169924
𝕜 : Type u_1
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝⁴ : OrderedRing 𝕜
inst✝³ : Fintype V
inst✝² : Fintype (Sym2 V)
inst✝¹ : DecidableEq V
inst✝ : DecidableRel G.Adj
p : SimpleGraph V → Prop
r r₁ r₂ : 𝕜
h : DeleteFar G p r
H : SimpleGraph V
hHG : H ≤ G
hH : p H
⊢ r ≤ ↑(card (edgeFinset G)) - ↑(card (edgeFinset H))

tactic: simp only [deleteEdges_sdiff_eq_of_le _ hHG, edgeFinset_mono hHG, card_sdiff,
  card_le_of_subset, coe_sdiff, coe_edgeFinset, Nat.cast_sub] at this
state_before: case refine'_1
ι : Sort ?u.169924
𝕜 : Type u_1
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝⁴ : OrderedRing 𝕜
inst✝³ : Fintype V
inst✝² : Fintype (Sym2 V)
inst✝¹ : DecidableEq V
inst✝ : DecidableRel G.Adj
p : SimpleGraph V → Prop
r r₁ r₂ : 𝕜
h : DeleteFar G p r
H : SimpleGraph V
hHG : H ≤ G
hH : p H
this : p (deleteEdges G ↑(edgeFinset G \ edgeFinset H)) → r ≤ ↑(card (edgeFinset G \ edgeFinset H))
⊢ r ≤ ↑(card (edgeFinset G)) - ↑(card (edgeFinset H))

tactic: exact this hH
state_before: case refine'_1
ι : Sort ?u.169924
𝕜 : Type u_1
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝⁴ : OrderedRing 𝕜
inst✝³ : Fintype V
inst✝² : Fintype (Sym2 V)
inst✝¹ : DecidableEq V
inst✝ : DecidableRel G.Adj
p : SimpleGraph V → Prop
r r₁ r₂ : 𝕜
h : DeleteFar G p r
H : SimpleGraph V
hHG : H ≤ G
hH : p H
this : p H → r ≤ ↑(card (edgeFinset G)) - ↑(card (edgeFinset H))
⊢ r ≤ ↑(card (edgeFinset G)) - ↑(card (edgeFinset H))

tactic: simpa [card_sdiff hs, edgeFinset_deleteEdges, -Set.toFinset_card, Nat.cast_sub,
  card_le_of_subset hs] using h (G.deleteEdges_le s) hG
state_before: case refine'_2
ι : Sort ?u.169924
𝕜 : Type u_1
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝⁴ : OrderedRing 𝕜
inst✝³ : Fintype V
inst✝² : Fintype (Sym2 V)
inst✝¹ : DecidableEq V
inst✝ : DecidableRel G.Adj
p : SimpleGraph V → Prop
r r₁ r₂ : 𝕜
h : ∀ ⦃H : SimpleGraph V⦄, H ≤ G → p H → r ≤ ↑(card (edgeFinset G)) - ↑(card (edgeFinset H))
s : Finset (Sym2 V)
hs : s ⊆ edgeFinset G
hG : p (deleteEdges G ↑s)
⊢ r ≤ ↑(card s)
Theorem: Set.forall_subtype_range_iff
File: Mathlib/Data/Set/Image.lean

tactic: subst hi
state_before: α : Type u_1
β : Type ?u.63927
γ : Type ?u.63930
ι : Sort u_2
ι' : Sort ?u.63936
f : ι → α
s t : Set α
p : ↑(range f) → Prop
H : ∀ (i : ι), p { val := f i, property := (_ : f i ∈ range f) }
x✝ : ↑(range f)
y : α
i : ι
hi : f i = y
⊢ p { val := y, property := (_ : ∃ y_1, f y_1 = y) }

tactic: apply H
state_before: α : Type u_1
β : Type ?u.63927
γ : Type ?u.63930
ι : Sort u_2
ι' : Sort ?u.63936
f : ι → α
s t : Set α
p : ↑(range f) → Prop
H : ∀ (i : ι), p { val := f i, property := (_ : f i ∈ range f) }
x✝ : ↑(range f)
i : ι
⊢ p { val := f i, property := (_ : ∃ y, f y = f i) }
Theorem: PiLp.nndist_eq_iSup
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: push_cast
state_before: p : ℝ≥0∞
𝕜 : Type ?u.210631
𝕜' : Type ?u.210634
ι : Type u_2
α : ι → Type ?u.210642
β✝ : ι → Type ?u.210647
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → PseudoMetricSpace (β i)
x y : PiLp ⊤ β
⊢ ↑(nndist x y) = ↑(⨆ (i : ι), nndist (x i) (y i))

tactic: exact dist_eq_iSup _ _
state_before: p : ℝ≥0∞
𝕜 : Type ?u.210631
𝕜' : Type ?u.210634
ι : Type u_2
α : ι → Type ?u.210642
β✝ : ι → Type ?u.210647
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → PseudoMetricSpace (β i)
x y : PiLp ⊤ β
⊢ dist x y = ⨆ (i : ι), dist (x i) (y i)