tasksource/leandojo huggingface dataset:
Theorem: Set.eq_insert_of_ncard_eq_succ
File: Mathlib/Data/Set/Ncard.lean

tactic: have hsf := Finite_of_ncard_pos (n.zero_lt_succ.trans_eq h.symm)
state_before: α : Type u_1
β : Type ?u.160028
s t : Set α
a b x y : α
f : α → β
n : ℕ
h : ncard s = n + 1
⊢ ∃ a t, ¬a ∈ t ∧ insert a t = s ∧ ncard t = n

tactic: rw [ncard_eq_toFinset_card _ hsf, Finset.card_eq_succ] at h
state_before: α : Type u_1
β : Type ?u.160028
s t : Set α
a b x y : α
f : α → β
n : ℕ
h : ncard s = n + 1
hsf : Set.Finite s
⊢ ∃ a t, ¬a ∈ t ∧ insert a t = s ∧ ncard t = n

tactic: obtain ⟨a, t, hat, hts, rfl⟩ := h
state_before: α : Type u_1
β : Type ?u.160028
s t : Set α
a b x y : α
f : α → β
n : ℕ
hsf : Set.Finite s
h✝ : Finset.card (Finite.toFinset hsf) = n + 1
h : ∃ a t, ¬a ∈ t ∧ insert a t = Finite.toFinset hsf ∧ Finset.card t = n
⊢ ∃ a t, ¬a ∈ t ∧ insert a t = s ∧ ncard t = n

tactic: simp only [Finset.ext_iff, Finset.mem_insert, Finite.mem_toFinset] at hts
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.160028
s t✝ : Set α
a✝ b x y : α
f : α → β
hsf : Set.Finite s
a : α
t : Finset α
hat : ¬a ∈ t
hts : insert a t = Finite.toFinset hsf
h : Finset.card (Finite.toFinset hsf) = Finset.card t + 1
⊢ ∃ a t_1, ¬a ∈ t_1 ∧ insert a t_1 = s ∧ ncard t_1 = Finset.card t

tactic: refine' ⟨a, t, hat, _, _⟩
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.160028
s t✝ : Set α
a✝ b x y : α
f : α → β
hsf : Set.Finite s
a : α
t : Finset α
hat : ¬a ∈ t
h : Finset.card (Finite.toFinset hsf) = Finset.card t + 1
hts : ∀ (a_1 : α), a_1 = a ∨ a_1 ∈ t ↔ a_1 ∈ s
⊢ ∃ a t_1, ¬a ∈ t_1 ∧ insert a t_1 = s ∧ ncard t_1 = Finset.card t

tactic: simp
state_before: case intro.intro.intro.intro.refine'_2
α : Type u_1
β : Type ?u.160028
s t✝ : Set α
a✝ b x y : α
f : α → β
hsf : Set.Finite s
a : α
t : Finset α
hat : ¬a ∈ t
h : Finset.card (Finite.toFinset hsf) = Finset.card t + 1
hts : ∀ (a_1 : α), a_1 = a ∨ a_1 ∈ t ↔ a_1 ∈ s
⊢ ncard ↑t = Finset.card t

tactic: simp only [Finset.mem_coe, ext_iff, mem_insert_iff]
state_before: case intro.intro.intro.intro.refine'_1
α : Type u_1
β : Type ?u.160028
s t✝ : Set α
a✝ b x y : α
f : α → β
hsf : Set.Finite s
a : α
t : Finset α
hat : ¬a ∈ t
h : Finset.card (Finite.toFinset hsf) = Finset.card t + 1
hts : ∀ (a_1 : α), a_1 = a ∨ a_1 ∈ t ↔ a_1 ∈ s
⊢ insert a ↑t = s

tactic: tauto
state_before: case intro.intro.intro.intro.refine'_1
α : Type u_1
β : Type ?u.160028
s t✝ : Set α
a✝ b x y : α
f : α → β
hsf : Set.Finite s
a : α
t : Finset α
hat : ¬a ∈ t
h : Finset.card (Finite.toFinset hsf) = Finset.card t + 1
hts : ∀ (a_1 : α), a_1 = a ∨ a_1 ∈ t ↔ a_1 ∈ s
⊢ ∀ (x : α), x = a ∨ x ∈ t ↔ x ∈ s
Theorem: Multiset.inf_add
File: Mathlib/Data/Multiset/Lattice.lean

tactic: simp [inf]
state_before: α : Type u_1
inst✝¹ : SemilatticeInf α
inst✝ : OrderTop α
s₁ s₂ : Multiset α
⊢ inf (s₁ + s₂) = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)
Theorem: fderiv_const_sub
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simp only [← fderivWithin_univ, fderivWithin_const_sub uniqueDiffWithinAt_univ]
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.579415
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.579510
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
c : F
⊢ fderiv 𝕜 (fun y => c - f y) x = -fderiv 𝕜 f x
Theorem: Complex.ofReal_log
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: rw [log_re, ofReal_re, abs_of_nonneg hx]
state_before: x : ℝ
hx : 0 ≤ x
⊢ (↑(Real.log x)).re = (log ↑x).re

tactic: rw [ofReal_im, log_im, arg_ofReal_of_nonneg hx]
state_before: x : ℝ
hx : 0 ≤ x
⊢ (↑(Real.log x)).im = (log ↑x).im
Theorem: Int.span_natAbs
File: Mathlib/RingTheory/Int/Basic.lean

tactic: rw [Ideal.span_singleton_eq_span_singleton]
state_before: a : ℤ
⊢ Ideal.span {↑(natAbs a)} = Ideal.span {a}

tactic: exact (associated_natAbs _).symm
state_before: a : ℤ
⊢ Associated (↑(natAbs a)) a
Theorem: inv_div_left
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.24338
G : Type ?u.24341
inst✝ : DivisionMonoid α
a b c : α
⊢ a⁻¹ / b = (b * a)⁻¹
Theorem: JordanHolderLattice.isMaximal_of_eq_inf
File: Mathlib/Order/JordanHolder.lean

tactic: have hb : x ⊔ y = b := sup_eq_of_isMaximal hxb hyb hxy
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x b a y : X
ha : x ⊓ y = a
hxy : x ≠ y
hxb : IsMaximal x b
hyb : IsMaximal y b
⊢ IsMaximal a y

tactic: substs a b
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x b a y : X
ha : x ⊓ y = a
hxy : x ≠ y
hxb : IsMaximal x b
hyb : IsMaximal y b
hb : x ⊔ y = b
⊢ IsMaximal a y

tactic: exact isMaximal_inf_right_of_isMaximal_sup hxb hyb
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x y : X
hxy : x ≠ y
hxb : IsMaximal x (x ⊔ y)
hyb : IsMaximal y (x ⊔ y)
⊢ IsMaximal (x ⊓ y) y
Theorem: MeasureTheory.IntegrableOn.smul_continuousOn
File: Mathlib/MeasureTheory/Function/LocallyIntegrable.lean

tactic: rw [IntegrableOn, ← integrable_norm_iff]
state_before: X : Type u_1
Y : Type ?u.2491139
E : Type u_2
R : Type ?u.2491145
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_3
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X E
f : X → 𝕜
hf : IntegrableOn f K
g : X → E
hg : ContinuousOn g K
hK : IsCompact K
⊢ IntegrableOn (fun x => f x • g x) K

tactic: simp_rw [norm_smul]
state_before: X : Type u_1
Y : Type ?u.2491139
E : Type u_2
R : Type ?u.2491145
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_3
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X E
f : X → 𝕜
hf : IntegrableOn f K
g : X → E
hg : ContinuousOn g K
hK : IsCompact K
⊢ Integrable fun a => ‖f a • g a‖

tactic: refine' IntegrableOn.mul_continuousOn hf.norm _ hK
state_before: X : Type u_1
Y : Type ?u.2491139
E : Type u_2
R : Type ?u.2491145
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_3
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X E
f : X → 𝕜
hf : IntegrableOn f K
g : X → E
hg : ContinuousOn g K
hK : IsCompact K
⊢ Integrable fun a => ‖f a‖ * ‖g a‖

tactic: exact continuous_norm.comp_continuousOn hg
state_before: X : Type u_1
Y : Type ?u.2491139
E : Type u_2
R : Type ?u.2491145
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_3
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X E
f : X → 𝕜
hf : IntegrableOn f K
g : X → E
hg : ContinuousOn g K
hK : IsCompact K
⊢ ContinuousOn (fun a => ‖g a‖) K

tactic: exact hf.1.smul (hg.aestronglyMeasurable hK.measurableSet)
state_before: X : Type u_1
Y : Type ?u.2491139
E : Type u_2
R : Type ?u.2491145
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_3
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X E
f : X → 𝕜
hf : IntegrableOn f K
g : X → E
hg : ContinuousOn g K
hK : IsCompact K
⊢ AEStronglyMeasurable (fun x => f x • g x) (Measure.restrict μ K)
Theorem: compactumToCompHaus.faithful
File: Mathlib/Topology/Category/Compactum.lean

tactic: intro _ _ _ _ h
state_before: ⊢ ∀ {X Y : Compactum}, Function.Injective compactumToCompHaus.map

tactic: apply Monad.Algebra.Hom.ext
state_before: X✝ Y✝ : Compactum
a₁✝ a₂✝ : X✝ ⟶ Y✝
h : compactumToCompHaus.map a₁✝ = compactumToCompHaus.map a₂✝
⊢ a₁✝ = a₂✝

tactic: apply congrArg (fun f => f.toFun) h
state_before: case f
X✝ Y✝ : Compactum
a₁✝ a₂✝ : X✝ ⟶ Y✝
h : compactumToCompHaus.map a₁✝ = compactumToCompHaus.map a₂✝
⊢ a₁✝.f = a₂✝.f
Theorem: lipschitzOnWith_iff_restrict
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
K : ℝ≥0
f : α → β
s : Set α
⊢ LipschitzOnWith K f s ↔ LipschitzWith K (restrict s f)
Theorem: sSup_compact_eq_top
File: Mathlib/Order/CompactlyGenerated.lean

tactic: refine' Eq.trans (congr rfl (Set.ext fun x => _)) (sSup_compact_le_eq ⊤)
state_before: ι : Sort ?u.87370
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
a b : α
s : Set α
⊢ sSup {a | CompleteLattice.IsCompactElement a} = ⊤

tactic: exact (and_iff_left le_top).symm
state_before: ι : Sort ?u.87370
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
a b : α
s : Set α
x : α
⊢ x ∈ {a | CompleteLattice.IsCompactElement a} ↔ x ∈ {c | CompleteLattice.IsCompactElement c ∧ c ≤ ⊤}
Theorem: Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

tactic: apply le_antisymm (I.homogeneousCore'_le 𝒜) _
state_before: ι : Type u_1
σ : Type u_2
R : Type ?u.105177
A : Type u_3
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I : Ideal A
h : IsHomogeneous 𝒜 I
⊢ HomogeneousIdeal.toIdeal (homogeneousCore 𝒜 I) = I

tactic: intro x hx
state_before: ι : Type u_1
σ : Type u_2
R : Type ?u.105177
A : Type u_3
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I : Ideal A
h : IsHomogeneous 𝒜 I
⊢ I ≤ homogeneousCore' 𝒜 I

tactic: classical
rw [← DirectSum.sum_support_decompose 𝒜 x]
exact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, homogeneous_coe _⟩, h _ hx, rfl⟩
state_before: ι : Type u_1
σ : Type u_2
R : Type ?u.105177
A : Type u_3
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I : Ideal A
h : IsHomogeneous 𝒜 I
x : A
hx : x ∈ I
⊢ x ∈ homogeneousCore' 𝒜 I

tactic: rw [← DirectSum.sum_support_decompose 𝒜 x]
state_before: ι : Type u_1
σ : Type u_2
R : Type ?u.105177
A : Type u_3
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I : Ideal A
h : IsHomogeneous 𝒜 I
x : A
hx : x ∈ I
⊢ x ∈ homogeneousCore' 𝒜 I

tactic: exact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, homogeneous_coe _⟩, h _ hx, rfl⟩
state_before: ι : Type u_1
σ : Type u_2
R : Type ?u.105177
A : Type u_3
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I : Ideal A
h : IsHomogeneous 𝒜 I
x : A
hx : x ∈ I
⊢ ∑ i in Dfinsupp.support (↑(decompose 𝒜) x), ↑(↑(↑(decompose 𝒜) x) i) ∈ homogeneousCore' 𝒜 I
Theorem: Nat.properDivisors_eq_singleton_one_iff_prime
File: Mathlib/NumberTheory/Divisors.lean

tactic: refine ⟨?_, ?_⟩
state_before: n : ℕ
⊢ properDivisors n = {1} ↔ Prime n

tactic: intro h
state_before: case refine_1
n : ℕ
⊢ properDivisors n = {1} → Prime n

tactic: refine' Nat.prime_def_lt''.mpr ⟨_, fun m hdvd => _⟩
state_before: case refine_1
n : ℕ
h : properDivisors n = {1}
⊢ Prime n

tactic: match n with
| 0 => contradiction
| 1 => contradiction
| Nat.succ (Nat.succ n) => simp [succ_le_succ]
state_before: case refine_1.refine'_1
n : ℕ
h : properDivisors n = {1}
⊢ 2 ≤ n

tactic: contradiction
state_before: n : ℕ
h : properDivisors 0 = {1}
⊢ 2 ≤ 0

tactic: contradiction
state_before: n : ℕ
h : properDivisors 1 = {1}
⊢ 2 ≤ 1

tactic: simp [succ_le_succ]
state_before: n✝ n : ℕ
h : properDivisors (succ (succ n)) = {1}
⊢ 2 ≤ succ (succ n)

tactic: rw [← mem_singleton, ← h, mem_properDivisors]
state_before: case refine_1.refine'_2
n : ℕ
h : properDivisors n = {1}
m : ℕ
hdvd : m ∣ n
⊢ m = 1 ∨ m = n

tactic: have := Nat.le_of_dvd ?_ hdvd
state_before: case refine_1.refine'_2
n : ℕ
h : properDivisors n = {1}
m : ℕ
hdvd : m ∣ n
⊢ m ∣ n ∧ m < n ∨ m = n

tactic: simp [hdvd, this]
state_before: case refine_1.refine'_2.refine_2
n : ℕ
h : properDivisors n = {1}
m : ℕ
hdvd : m ∣ n
this : m ≤ n
⊢ m ∣ n ∧ m < n ∨ m = n

tactic: exact (le_iff_eq_or_lt.mp this).symm
state_before: case refine_1.refine'_2.refine_2
n : ℕ
h : properDivisors n = {1}
m : ℕ
hdvd : m ∣ n
this : m ≤ n
⊢ m < n ∨ m = n

tactic: by_contra'
state_before: case refine_1.refine'_2.refine_1
n : ℕ
h : properDivisors n = {1}
m : ℕ
hdvd : m ∣ n
⊢ 0 < n

tactic: simp [nonpos_iff_eq_zero.mp this, this] at h
state_before: case refine_1.refine'_2.refine_1
n : ℕ
h : properDivisors n = {1}
m : ℕ
hdvd : m ∣ n
this : n ≤ 0
⊢ False

tactic: exact fun h => Prime.properDivisors h
state_before: case refine_2
n : ℕ
⊢ Prime n → properDivisors n = {1}
Theorem: Finsupp.erase_single_ne
File: Mathlib/Data/Finsupp/Defs.lean

tactic: ext s
state_before: α : Type u_1
β : Type ?u.165853
γ : Type ?u.165856
ι : Type ?u.165859
M : Type u_2
M' : Type ?u.165865
N : Type ?u.165868
P : Type ?u.165871
G : Type ?u.165874
H : Type ?u.165877
R : Type ?u.165880
S : Type ?u.165883
inst✝ : Zero M
a a' : α
b : M
h : a ≠ a'
⊢ erase a (single a' b) = single a' b

tactic: by_cases hs : s = a
state_before: case h
α : Type u_1
β : Type ?u.165853
γ : Type ?u.165856
ι : Type ?u.165859
M : Type u_2
M' : Type ?u.165865
N : Type ?u.165868
P : Type ?u.165871
G : Type ?u.165874
H : Type ?u.165877
R : Type ?u.165880
S : Type ?u.165883
inst✝ : Zero M
a a' : α
b : M
h : a ≠ a'
s : α
⊢ ↑(erase a (single a' b)) s = ↑(single a' b) s

tactic: rw [hs, erase_same, single_eq_of_ne h.symm]
state_before: case pos
α : Type u_1
β : Type ?u.165853
γ : Type ?u.165856
ι : Type ?u.165859
M : Type u_2
M' : Type ?u.165865
N : Type ?u.165868
P : Type ?u.165871
G : Type ?u.165874
H : Type ?u.165877
R : Type ?u.165880
S : Type ?u.165883
inst✝ : Zero M
a a' : α
b : M
h : a ≠ a'
s : α
hs : s = a
⊢ ↑(erase a (single a' b)) s = ↑(single a' b) s

tactic: rw [erase_ne hs]
state_before: case neg
α : Type u_1
β : Type ?u.165853
γ : Type ?u.165856
ι : Type ?u.165859
M : Type u_2
M' : Type ?u.165865
N : Type ?u.165868
P : Type ?u.165871
G : Type ?u.165874
H : Type ?u.165877
R : Type ?u.165880
S : Type ?u.165883
inst✝ : Zero M
a a' : α
b : M
h : a ≠ a'
s : α
hs : ¬s = a
⊢ ↑(erase a (single a' b)) s = ↑(single a' b) s
Theorem: csSup_image2_eq_csSup_csSup
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: refine' eq_of_forall_ge_iff fun c => _
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
ι : Sort ?u.111757
inst✝² : ConditionallyCompleteLattice α
inst✝¹ : ConditionallyCompleteLattice β
inst✝ : ConditionallyCompleteLattice γ
f : α → β → γ
s : Set α
t : Set β
l u : α → β → γ
l₁ u₁ : β → γ → α
l₂ u₂ : α → γ → β
h₁ : ∀ (b : β), GaloisConnection (swap l b) (u₁ b)
h₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a)
hs₀ : Set.Nonempty s
hs₁ : BddAbove s
ht₀ : Set.Nonempty t
ht₁ : BddAbove t
⊢ sSup (image2 l s t) = l (sSup s) (sSup t)

tactic: rw [csSup_le_iff (hs₁.image2 (fun _ => (h₁ _).monotone_l) (fun _ => (h₂ _).monotone_l) ht₁)
    (hs₀.image2 ht₀),
  forall_image2_iff, forall₂_swap, (h₂ _).le_iff_le, csSup_le_iff ht₁ ht₀]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
ι : Sort ?u.111757
inst✝² : ConditionallyCompleteLattice α
inst✝¹ : ConditionallyCompleteLattice β
inst✝ : ConditionallyCompleteLattice γ
f : α → β → γ
s : Set α
t : Set β
l u : α → β → γ
l₁ u₁ : β → γ → α
l₂ u₂ : α → γ → β
h₁ : ∀ (b : β), GaloisConnection (swap l b) (u₁ b)
h₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a)
hs₀ : Set.Nonempty s
hs₁ : BddAbove s
ht₀ : Set.Nonempty t
ht₁ : BddAbove t
c : γ
⊢ sSup (image2 l s t) ≤ c ↔ l (sSup s) (sSup t) ≤ c

tactic: simp_rw [← (h₂ _).le_iff_le, (h₁ _).le_iff_le, csSup_le_iff hs₁ hs₀]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
ι : Sort ?u.111757
inst✝² : ConditionallyCompleteLattice α
inst✝¹ : ConditionallyCompleteLattice β
inst✝ : ConditionallyCompleteLattice γ
f : α → β → γ
s : Set α
t : Set β
l u : α → β → γ
l₁ u₁ : β → γ → α
l₂ u₂ : α → γ → β
h₁ : ∀ (b : β), GaloisConnection (swap l b) (u₁ b)
h₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a)
hs₀ : Set.Nonempty s
hs₁ : BddAbove s
ht₀ : Set.Nonempty t
ht₁ : BddAbove t
c : γ
⊢ (∀ (i₂ : β), i₂ ∈ t → ∀ (i₁ : α), i₁ ∈ s → l i₁ i₂ ≤ c) ↔ ∀ (b : β), b ∈ t → b ≤ u₂ (sSup s) c
Theorem: Nat.dvd_sub
File: Std/Data/Nat/Lemmas.lean

tactic: rwa [Nat.sub_add_cancel H]
state_before: k m n : Nat
H : n ≤ m
h₁ : k ∣ m
h₂ : k ∣ n
⊢ k ∣ m - n + n
Theorem: LocalEquiv.image_eq_target_inter_inv_preimage
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.32478
δ : Type ?u.32481
e : LocalEquiv α β
e' : LocalEquiv β γ
s : Set α
h : s ⊆ e.source
⊢ ↑e '' s = e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' s
Theorem: ENNReal.finite_const_le_of_tsum_ne_top
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: by_contra h
state_before: α : Type ?u.301039
β : Type ?u.301042
γ : Type ?u.301045
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_1
a : ι → ℝ≥0∞
tsum_ne_top : (∑' (i : ι), a i) ≠ ⊤
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
⊢ Set.Finite {i | ε ≤ a i}

tactic: have := Infinite.to_subtype h
state_before: α : Type ?u.301039
β : Type ?u.301042
γ : Type ?u.301045
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_1
a : ι → ℝ≥0∞
tsum_ne_top : (∑' (i : ι), a i) ≠ ⊤
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
h : ¬Set.Finite {i | ε ≤ a i}
⊢ False

tactic: refine tsum_ne_top (top_unique ?_)
state_before: α : Type ?u.301039
β : Type ?u.301042
γ : Type ?u.301045
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_1
a : ι → ℝ≥0∞
tsum_ne_top : (∑' (i : ι), a i) ≠ ⊤
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
h : ¬Set.Finite {i | ε ≤ a i}
this : Infinite ↑{i | ε ≤ a i}
⊢ False

tactic: calc ⊤ = ∑' _ : { i | ε ≤ a i }, ε := (tsum_const_eq_top_of_ne_zero ε_ne_zero).symm
_ ≤ ∑' i, a i := tsum_le_tsum_of_inj (↑) Subtype.val_injective (fun _ _ => zero_le _)
  (fun i => i.2) ENNReal.summable ENNReal.summable
state_before: α : Type ?u.301039
β : Type ?u.301042
γ : Type ?u.301045
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_1
a : ι → ℝ≥0∞
tsum_ne_top : (∑' (i : ι), a i) ≠ ⊤
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
h : ¬Set.Finite {i | ε ≤ a i}
this : Infinite ↑{i | ε ≤ a i}
⊢ ⊤ ≤ ∑' (i : ι), a i
Theorem: CategoryTheory.GrothendieckTopology.sheafifyCompIso_inv_eq_sheafifyLift
File: Mathlib/CategoryTheory/Sites/CompatibleSheafification.lean

tactic: apply J.sheafifyLift_unique
state_before: C : Type u
inst✝¹² : Category C
J : GrothendieckTopology C
D : Type w₁
inst✝¹¹ : Category D
E : Type w₂
inst✝¹⁰ : Category E
F : D ⥤ E
inst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D
inst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E
inst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E
inst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F
inst✝⁴ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F
P : Cᵒᵖ ⥤ D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
⊢ (sheafifyCompIso J F P).inv =
    sheafifyLift J (whiskerRight (toSheafify J P) F) (_ : Presheaf.IsSheaf J (sheafify J P ⋙ F))

tactic: rw [Iso.comp_inv_eq]
state_before: case a
C : Type u
inst✝¹² : Category C
J : GrothendieckTopology C
D : Type w₁
inst✝¹¹ : Category D
E : Type w₂
inst✝¹⁰ : Category E
F : D ⥤ E
inst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D
inst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E
inst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E
inst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F
inst✝⁴ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F
P : Cᵒᵖ ⥤ D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
⊢ toSheafify J (P ⋙ F) ≫ (sheafifyCompIso J F P).inv = whiskerRight (toSheafify J P) F

tactic: simp
state_before: case a
C : Type u
inst✝¹² : Category C
J : GrothendieckTopology C
D : Type w₁
inst✝¹¹ : Category D
E : Type w₂
inst✝¹⁰ : Category E
F : D ⥤ E
inst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D
inst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E
inst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E
inst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F
inst✝⁴ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F
P : Cᵒᵖ ⥤ D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
⊢ toSheafify J (P ⋙ F) = whiskerRight (toSheafify J P) F ≫ (sheafifyCompIso J F P).hom
Theorem: bernoulli_eq_bernoulli'_of_ne_one
File: Mathlib/NumberTheory/Bernoulli.lean

tactic: by_cases h0 : n = 0
state_before: A : Type ?u.635032
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
hn : n ≠ 1
⊢ bernoulli n = bernoulli' n

tactic: rw [bernoulli, neg_one_pow_eq_pow_mod_two]
state_before: case neg
A : Type ?u.635032
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
hn : n ≠ 1
h0 : ¬n = 0
⊢ bernoulli n = bernoulli' n

tactic: cases' mod_two_eq_zero_or_one n with h h
state_before: case neg
A : Type ?u.635032
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
hn : n ≠ 1
h0 : ¬n = 0
⊢ (-1) ^ (n % 2) * bernoulli' n = bernoulli' n

tactic: simp [h0]
state_before: case pos
A : Type ?u.635032
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
hn : n ≠ 1
h0 : n = 0
⊢ bernoulli n = bernoulli' n

tactic: simp [h]
state_before: case neg.inl
A : Type ?u.635032
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
hn : n ≠ 1
h0 : ¬n = 0
h : n % 2 = 0
⊢ (-1) ^ (n % 2) * bernoulli' n = bernoulli' n

tactic: simp [bernoulli'_odd_eq_zero (odd_iff.mpr h) (one_lt_iff_ne_zero_and_ne_one.mpr ⟨h0, hn⟩)]
state_before: case neg.inr
A : Type ?u.635032
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
hn : n ≠ 1
h0 : ¬n = 0
h : n % 2 = 1
⊢ (-1) ^ (n % 2) * bernoulli' n = bernoulli' n