tasksource/leandojo huggingface dataset:
Theorem: Finset.erase_cons_of_ne
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [cons_eq_insert, erase_insert_of_ne hb]
state_before: α : Type u_1
β : Type ?u.210946
γ : Type ?u.210949
inst✝ : DecidableEq α
s✝ t u v : Finset α
a✝ b✝ a b : α
s : Finset α
ha : ¬a ∈ s
hb : a ≠ b
⊢ erase (cons a s ha) b = cons a (erase s b) (_ : a ∈ erase s b → False)
Theorem: SimpleGraph.Subgraph.mem_verts_if_mem_edge
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: revert hv
state_before: ι : Sort ?u.10234
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : Subgraph G
e : Sym2 V
v : V
he : e ∈ edgeSet G'
hv : v ∈ e
⊢ v ∈ G'.verts

tactic: refine' Sym2.ind (fun v w he ↦ _) e he
state_before: ι : Sort ?u.10234
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : Subgraph G
e : Sym2 V
v : V
he : e ∈ edgeSet G'
⊢ v ∈ e → v ∈ G'.verts

tactic: intro hv
state_before: ι : Sort ?u.10234
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : Subgraph G
e : Sym2 V
v✝ : V
he✝ : e ∈ edgeSet G'
v w : V
he : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G'
⊢ v✝ ∈ Quotient.mk (Sym2.Rel.setoid V) (v, w) → v✝ ∈ G'.verts

tactic: rcases Sym2.mem_iff.mp hv with (rfl | rfl)
state_before: ι : Sort ?u.10234
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : Subgraph G
e : Sym2 V
v✝ : V
he✝ : e ∈ edgeSet G'
v w : V
he : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G'
hv : v✝ ∈ Quotient.mk (Sym2.Rel.setoid V) (v, w)
⊢ v✝ ∈ G'.verts

tactic: exact G'.edge_vert he
state_before: case inl
ι : Sort ?u.10234
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : Subgraph G
e : Sym2 V
v : V
he✝ : e ∈ edgeSet G'
w : V
he : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G'
hv : v ∈ Quotient.mk (Sym2.Rel.setoid V) (v, w)
⊢ v ∈ G'.verts

tactic: exact G'.edge_vert (G'.symm he)
state_before: case inr
ι : Sort ?u.10234
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : Subgraph G
e : Sym2 V
v✝ : V
he✝ : e ∈ edgeSet G'
v : V
he : Quotient.mk (Sym2.Rel.setoid V) (v, v✝) ∈ edgeSet G'
hv : v✝ ∈ Quotient.mk (Sym2.Rel.setoid V) (v, v✝)
⊢ v✝ ∈ G'.verts
Theorem: Rat.mul_assoc
File: Mathlib/Data/Rat/Defs.lean

tactic: simp [h₁, h₂, h₃, mul_ne_zero, mul_comm, mul_assoc, mul_left_comm]
state_before: a b c : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
n₃ : ℤ
d₃ : ℕ
h₃ : d₃ ≠ 0
⊢ n₁ /. ↑d₁ * (n₂ /. ↑d₂) * (n₃ /. ↑d₃) = n₁ /. ↑d₁ * (n₂ /. ↑d₂ * (n₃ /. ↑d₃))
Theorem: List.forM_append
File: Std/Data/List/Lemmas.lean

tactic: induction l₁ <;> simp [*]
state_before: m : Type u_1 → Type u_2
α : Type u_3
inst✝¹ : Monad m
inst✝ : LawfulMonad m
l₁ l₂ : List α
f : α → m PUnit
⊢ List.forM (l₁ ++ l₂) f = do
    List.forM l₁ f
    List.forM l₂ f
Theorem: lift_nhds_left
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [nhds_eq_comap_uniformity, comap_lift_eq2 hg]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.77543
inst✝ : UniformSpace α
x : α
g : Set α → Filter β
hg : Monotone g
⊢ Filter.lift (𝓝 x) g = Filter.lift (𝓤 α) fun s => g (ball x s)

tactic: rfl
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.77543
inst✝ : UniformSpace α
x : α
g : Set α → Filter β
hg : Monotone g
⊢ Filter.lift (𝓤 α) (g ∘ preimage (Prod.mk x)) = Filter.lift (𝓤 α) fun s => g (ball x s)
Theorem: ContinuousLinearMap.IsPositive.orthogonalProjection_comp
File: Mathlib/Analysis/InnerProductSpace/Positive.lean

tactic: have := hT.conj_adjoint (orthogonalProjection U : E →L[𝕜] U)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.275809
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : InnerProductSpace 𝕜 F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
T : E →L[𝕜] E
hT : IsPositive T
U : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ U }
⊢ IsPositive (comp (orthogonalProjection U) (comp T (Submodule.subtypeL U)))

tactic: rwa [U.adjoint_orthogonalProjection] at this
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.275809
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : InnerProductSpace 𝕜 F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
T : E →L[𝕜] E
hT : IsPositive T
U : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ U }
this : IsPositive (comp (orthogonalProjection U) (comp T (↑adjoint (orthogonalProjection U))))
⊢ IsPositive (comp (orthogonalProjection U) (comp T (Submodule.subtypeL U)))
Theorem: Option.liftOrGet_eq_or_eq
File: Std/Data/Option/Lemmas.lean

tactic: have := h a b
state_before: α : Type u_1
f : α → α → α
h : ∀ (a b : α), f a b = a ∨ f a b = b
a b : α
⊢ liftOrGet f (some a) (some b) = some a ∨ liftOrGet f (some a) (some b) = some b

tactic: simp [liftOrGet] at this ⊢
state_before: α : Type u_1
f : α → α → α
h : ∀ (a b : α), f a b = a ∨ f a b = b
a b : α
this : f a b = a ∨ f a b = b
⊢ liftOrGet f (some a) (some b) = some a ∨ liftOrGet f (some a) (some b) = some b

tactic: exact this
state_before: α : Type u_1
f : α → α → α
h : ∀ (a b : α), f a b = a ∨ f a b = b
a b : α
this : f a b = a ∨ f a b = b
⊢ f a b = a ∨ f a b = b
Theorem: le_abs'
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: rw [le_abs, or_comm, @le_neg α]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ a ≤ abs b ↔ b ≤ -a ∨ a ≤ b
Theorem: LinearMap.im_inner_adjoint_mul_self_eq_zero
File: Mathlib/Analysis/InnerProductSpace/Adjoint.lean

tactic: simp only [mul_apply, adjoint_inner_right, inner_self_eq_norm_sq_to_K]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.2366720
G : Type ?u.2366723
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ ↑im (inner x (↑(↑adjoint T) (↑T x))) = 0

tactic: norm_cast
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.2366720
G : Type ?u.2366723
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ ↑im (↑‖↑T x‖ ^ 2) = 0
Theorem: Nat.factorization_mul_of_coprime
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: ext q
state_before: a b : ℕ
hab : coprime a b
⊢ factorization (a * b) = factorization a + factorization b

tactic: rw [Finsupp.add_apply, factorization_mul_apply_of_coprime hab]
state_before: case h
a b : ℕ
hab : coprime a b
q : ℕ
⊢ ↑(factorization (a * b)) q = ↑(factorization a + factorization b) q
Theorem: Set.exists_eq_singleton_iff_nonempty_subsingleton
File: Mathlib/Data/Set/Basic.lean

tactic: refine' ⟨_, fun h => _⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
⊢ (∃ a, s = {a}) ↔ Set.Nonempty s ∧ Set.Subsingleton s

tactic: rintro ⟨a, rfl⟩
state_before: case refine'_1
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
⊢ (∃ a, s = {a}) → Set.Nonempty s ∧ Set.Subsingleton s

tactic: exact ⟨singleton_nonempty a, subsingleton_singleton⟩
state_before: case refine'_1.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
a✝ b : α
s₁ s₂ t t₁ t₂ u : Set α
a : α
⊢ Set.Nonempty {a} ∧ Set.Subsingleton {a}

tactic: exact h.2.eq_empty_or_singleton.resolve_left h.1.ne_empty
state_before: case refine'_2
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
h : Set.Nonempty s ∧ Set.Subsingleton s
⊢ ∃ a, s = {a}
Theorem: WittVector.ghostFun_one
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: ghost_fun_tac 1, ![]
state_before: p : ℕ
R : Type u_1
S : Type ?u.650613
T : Type ?u.650616
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type ?u.650631
β : Type ?u.650634
x y : 𝕎 R
⊢ WittVector.ghostFun 1 = 1
Theorem: Function.Periodic.mul
File: Mathlib/Algebra/Periodic.lean

tactic: simp_all
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.27631
f g : α → β
c c₁ c₂ x : α
inst✝¹ : Add α
inst✝ : Mul β
hf : Periodic f c
hg : Periodic g c
⊢ Periodic (f * g) c
Theorem: Associates.mul_eq_one_iff
File: Mathlib/Algebra/Associated.lean

tactic: rwa [mul_comm] at this
state_before: α : Type u_1
β : Type ?u.285626
γ : Type ?u.285629
δ : Type ?u.285632
inst✝ : CommMonoid α
x y : Associates α
a b : α
h : Quotient.mk (Associated.setoid α) a * Quotient.mk (Associated.setoid α) b = 1
this : a * b ~ᵤ 1
⊢ b * ?m.287732 a b h this ~ᵤ 1

tactic: simp (config := { contextual := true })
state_before: α : Type u_1
β : Type ?u.285626
γ : Type ?u.285629
δ : Type ?u.285632
inst✝ : CommMonoid α
x y : Associates α
⊢ x = 1 ∧ y = 1 → x * y = 1
Theorem: InnerProductGeometry.angle_neg_self_of_nonzero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [angle_comm, angle_self_neg_of_nonzero hx]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
hx : x ≠ 0
⊢ angle (-x) x = π
Theorem: Polynomial.le_rootMultiplicity_iff
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [rootMultiplicity_eq_nat_find_of_nonzero p0, Nat.le_find_iff]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ n ≤ rootMultiplicity a p ↔ (X - ↑C a) ^ n ∣ p

tactic: simp_rw [Classical.not_not]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ (∀ (m : ℕ), m < n → ¬¬(X - ↑C a) ^ (m + 1) ∣ p) ↔ (X - ↑C a) ^ n ∣ p

tactic: refine ⟨fun h => ?_, fun h m hm => (pow_dvd_pow _ hm).trans h⟩
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ (∀ (m : ℕ), m < n → (X - ↑C a) ^ (m + 1) ∣ p) ↔ (X - ↑C a) ^ n ∣ p

tactic: cases' n with n
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
h : ∀ (m : ℕ), m < n → (X - ↑C a) ^ (m + 1) ∣ p
⊢ (X - ↑C a) ^ n ∣ p

tactic: rw [pow_zero]
state_before: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
h : ∀ (m : ℕ), m < Nat.zero → (X - ↑C a) ^ (m + 1) ∣ p
⊢ (X - ↑C a) ^ Nat.zero ∣ p

tactic: apply one_dvd
state_before: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
h : ∀ (m : ℕ), m < Nat.zero → (X - ↑C a) ^ (m + 1) ∣ p
⊢ 1 ∣ p

tactic: exact h n n.lt_succ_self
state_before: case succ
R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
h : ∀ (m : ℕ), m < Nat.succ n → (X - ↑C a) ^ (m + 1) ∣ p
⊢ (X - ↑C a) ^ Nat.succ n ∣ p
Theorem: Module.Ray.units_smul_of_pos
File: Mathlib/LinearAlgebra/Ray.lean

tactic: induction v using Module.Ray.ind
state_before: R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type ?u.131381
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type ?u.131463
inst✝ : DecidableEq ι
u : Rˣ
hu : 0 < ↑u
v : Ray R M
⊢ u • v = v

tactic: rw [smul_rayOfNeZero, ray_eq_iff]
state_before: case h
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type ?u.131381
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type ?u.131463
inst✝ : DecidableEq ι
u : Rˣ
hu : 0 < ↑u
v✝ : M
hv✝ : v✝ ≠ 0
⊢ u • rayOfNeZero R v✝ hv✝ = rayOfNeZero R v✝ hv✝

tactic: exact SameRay.sameRay_pos_smul_left _ hu
state_before: case h
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type ?u.131381
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type ?u.131463
inst✝ : DecidableEq ι
u : Rˣ
hu : 0 < ↑u
v✝ : M
hv✝ : v✝ ≠ 0
⊢ SameRay R (u • v✝) v✝
Theorem: Ideal.eq_span_singleton_mul
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: simp only [le_antisymm_iff, le_span_singleton_mul_iff, span_singleton_mul_le_iff]
state_before: R : Type u
ι : Type ?u.243853
inst✝ : CommSemiring R
I✝ J✝ K L : Ideal R
x : R
I J : Ideal R
⊢ I = span {x} * J ↔ (∀ (zI : R), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zJ = zI) ∧ ∀ (z : R), z ∈ J → x * z ∈ I
Theorem: IsOpenMap.comp
File: Mathlib/Topology/Maps.lean

tactic: rw [image_comp]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.139304
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f✝ : α → β
g : β → γ
f : α → β
hg : IsOpenMap g
hf : IsOpenMap f
s : Set α
hs : IsOpen s
⊢ IsOpen (g ∘ f '' s)

tactic: exact hg _ (hf _ hs)
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.139304
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f✝ : α → β
g : β → γ
f : α → β
hg : IsOpenMap g
hf : IsOpenMap f
s : Set α
hs : IsOpen s
⊢ IsOpen (g '' (f '' s))
Theorem: CategoryTheory.shift_shift'
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: symm
state_before: C : Type u
A : Type u_1
inst✝² : Category C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
i j : A
⊢ (shiftFunctor C j).map ((shiftFunctor C i).map f) =
    (shiftAdd X i j).inv ≫ (shiftFunctor C (i + j)).map f ≫ (shiftAdd Y i j).hom

tactic: apply NatIso.naturality_1
state_before: C : Type u
A : Type u_1
inst✝² : Category C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
X Y : C
f : X ⟶ Y
i j : A
⊢ (shiftAdd X i j).inv ≫ (shiftFunctor C (i + j)).map f ≫ (shiftAdd Y i j).hom =
    (shiftFunctor C j).map ((shiftFunctor C i).map f)
Theorem: MeasureTheory.FiniteMeasure.testAgainstNN_one
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: simp only [testAgainstNN, coe_one, Pi.one_apply, ENNReal.coe_one, lintegral_one]
state_before: Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type ?u.51970
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : TopologicalSpace Ω
μ : FiniteMeasure Ω
⊢ testAgainstNN μ 1 = mass μ

tactic: rfl
state_before: Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type ?u.51970
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : TopologicalSpace Ω
μ : FiniteMeasure Ω
⊢ ENNReal.toNNReal (↑↑↑μ univ) = mass μ
Theorem: CauSeq.lim_neg
File: Mathlib/Data/Real/CauSeqCompletion.lean

tactic: rw [const_neg, sub_neg_eq_add, add_comm, ← sub_eq_add_neg]
state_before: α : Type u_1
inst✝³ : LinearOrderedField α
β : Type u_2
inst✝² : Ring β
abv : β → α
inst✝¹ : IsAbsoluteValue abv
inst✝ : IsComplete β abv
f : CauSeq β abv
⊢ LimZero (-f - const abv (-lim f))

tactic: exact Setoid.symm (equiv_lim f)
state_before: α : Type u_1
inst✝³ : LinearOrderedField α
β : Type u_2
inst✝² : Ring β
abv : β → α
inst✝¹ : IsAbsoluteValue abv
inst✝ : IsComplete β abv
f : CauSeq β abv
⊢ LimZero (const abv (lim f) - f)
Theorem: partialSups_disjoint_of_disjoint
File: Mathlib/Order/PartialSups.lean

tactic: induction' m with m ih
state_before: α : Type u_1
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
f : ℕ → α
h : Pairwise (Disjoint on f)
m n : ℕ
hmn : m < n
⊢ Disjoint (↑(partialSups f) m) (f n)

tactic: exact h hmn.ne
state_before: case zero
α : Type u_1
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
f : ℕ → α
h : Pairwise (Disjoint on f)
m n : ℕ
hmn✝ : m < n
hmn : Nat.zero < n
⊢ Disjoint (↑(partialSups f) Nat.zero) (f n)

tactic: rw [partialSups_succ, disjoint_sup_left]
state_before: case succ
α : Type u_1
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
f : ℕ → α
h : Pairwise (Disjoint on f)
m✝ n : ℕ
hmn✝ : m✝ < n
m : ℕ
ih : m < n → Disjoint (↑(partialSups f) m) (f n)
hmn : Nat.succ m < n
⊢ Disjoint (↑(partialSups f) (Nat.succ m)) (f n)

tactic: exact ⟨ih (Nat.lt_of_succ_lt hmn), h hmn.ne⟩
state_before: case succ
α : Type u_1
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
f : ℕ → α
h : Pairwise (Disjoint on f)
m✝ n : ℕ
hmn✝ : m✝ < n
m : ℕ
ih : m < n → Disjoint (↑(partialSups f) m) (f n)
hmn : Nat.succ m < n
⊢ Disjoint (↑(partialSups f) m) (f n) ∧ Disjoint (f (m + 1)) (f n)
Theorem: Set.bounded_le_iff_bounded_lt
File: Mathlib/Order/Bounded.lean

tactic: refine' ⟨fun h => _, bounded_le_of_bounded_lt⟩
state_before: α : Type u_1
r : α → α → Prop
s t : Set α
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
⊢ Bounded (fun x x_1 => x ≤ x_1) s ↔ Bounded (fun x x_1 => x < x_1) s

tactic: cases' h with a ha
state_before: α : Type u_1
r : α → α → Prop
s t : Set α
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
h : Bounded (fun x x_1 => x ≤ x_1) s
⊢ Bounded (fun x x_1 => x < x_1) s

tactic: cases' exists_gt a with b hb
state_before: case intro
α : Type u_1
r : α → α → Prop
s t : Set α
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
a : α
ha : ∀ (b : α), b ∈ s → (fun x x_1 => x ≤ x_1) b a
⊢ Bounded (fun x x_1 => x < x_1) s

tactic: exact ⟨b, fun c hc => lt_of_le_of_lt (ha c hc) hb⟩
state_before: case intro.intro
α : Type u_1
r : α → α → Prop
s t : Set α
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
a : α
ha : ∀ (b : α), b ∈ s → (fun x x_1 => x ≤ x_1) b a
b : α
hb : a < b
⊢ Bounded (fun x x_1 => x < x_1) s
Theorem: Pmf.seq_apply
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

tactic: simp only [seq, mul_boole, bind_apply, pure_apply]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.45609
q : Pmf (α → β)
p : Pmf α
b : β
⊢ ↑(seq q p) b = ∑' (f : α → β) (a : α), if b = f a then ↑q f * ↑p a else 0

tactic: refine' tsum_congr fun f => ENNReal.tsum_mul_left.symm.trans (tsum_congr fun a => _)
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.45609
q : Pmf (α → β)
p : Pmf α
b : β
⊢ (∑' (a : α → β), ↑q a * ∑' (a_1 : α), if b = a a_1 then ↑p a_1 else 0) =
    ∑' (f : α → β) (a : α), if b = f a then ↑q f * ↑p a else 0

tactic: simpa only [MulZeroClass.mul_zero] using mul_ite (b = f a) (q f) (p a) 0
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.45609
q : Pmf (α → β)
p : Pmf α
b : β
f : α → β
a : α
⊢ (↑q f * if b = f a then ↑p a else 0) = if b = f a then ↑q f * ↑p a else 0
Theorem: Finsupp.prod_subtypeDomain_index
File: Mathlib/Data/Finsupp/Basic.lean

tactic: classical exact mem_subtype.1
state_before: α : Type u_2
β : Type ?u.488182
γ : Type ?u.488185
ι : Type ?u.488188
M : Type u_3
M' : Type ?u.488194
N : Type u_1
P : Type ?u.488200
G : Type ?u.488203
H : Type ?u.488206
R : Type ?u.488209
S : Type ?u.488212
inst✝¹ : Zero M
p : α → Prop
inst✝ : CommMonoid N
v : α →₀ M
h : α → M → N
hp : ∀ (x : α), x ∈ v.support → p x
x✝ : Subtype p
⊢ ∀ (ha : x✝ ∈ (subtypeDomain p v).support), (fun p_1 x => ↑p_1) x✝ ha ∈ v.support

tactic: exact mem_subtype.1
state_before: α : Type u_2
β : Type ?u.488182
γ : Type ?u.488185
ι : Type ?u.488188
M : Type u_3
M' : Type ?u.488194
N : Type u_1
P : Type ?u.488200
G : Type ?u.488203
H : Type ?u.488206
R : Type ?u.488209
S : Type ?u.488212
inst✝¹ : Zero M
p : α → Prop
inst✝ : CommMonoid N
v : α →₀ M
h : α → M → N
hp : ∀ (x : α), x ∈ v.support → p x
x✝ : Subtype p
⊢ ∀ (ha : x✝ ∈ (subtypeDomain p v).support), (fun p_1 x => ↑p_1) x✝ ha ∈ v.support

tactic: classical exact mem_subtype.2 hb
state_before: α : Type u_2
β : Type ?u.488182
γ : Type ?u.488185
ι : Type ?u.488188
M : Type u_3
M' : Type ?u.488194
N : Type u_1
P : Type ?u.488200
G : Type ?u.488203
H : Type ?u.488206
R : Type ?u.488209
S : Type ?u.488212
inst✝¹ : Zero M
p : α → Prop
inst✝ : CommMonoid N
v : α →₀ M
h : α → M → N
hp : ∀ (x : α), x ∈ v.support → p x
b : α
hb : b ∈ v.support
⊢ { val := b, property := (_ : p b) } ∈ (subtypeDomain p v).support

tactic: exact mem_subtype.2 hb
state_before: α : Type u_2
β : Type ?u.488182
γ : Type ?u.488185
ι : Type ?u.488188
M : Type u_3
M' : Type ?u.488194
N : Type u_1
P : Type ?u.488200
G : Type ?u.488203
H : Type ?u.488206
R : Type ?u.488209
S : Type ?u.488212
inst✝¹ : Zero M
p : α → Prop
inst✝ : CommMonoid N
v : α →₀ M
h : α → M → N
hp : ∀ (x : α), x ∈ v.support → p x
b : α
hb : b ∈ v.support
⊢ { val := b, property := (_ : p b) } ∈ (subtypeDomain p v).support
Theorem: Nat.geom_sum_le
File: Mathlib/Algebra/GeomSum.lean

tactic: refine' (Nat.le_div_iff_mul_le <| tsub_pos_of_lt hb).2 _
state_before: α : Type u
β : Type ?u.222007
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ∑ i in range n, a / b ^ i ≤ a * b / (b - 1)

tactic: cases' n with n
state_before: α : Type u
β : Type ?u.222007
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ (∑ i in range n, a / b ^ i) * (b - 1) ≤ a * b

tactic: rw [mul_comm]
state_before: case succ
α : Type u
β : Type ?u.222007
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ (∑ i in range (succ n), a / b ^ i) * (b - 1) ≤ a * b

tactic: exact (Nat.pred_mul_geom_sum_le a b n).trans tsub_le_self
state_before: case succ
α : Type u
β : Type ?u.222007
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ (b - 1) * ∑ i in range (succ n), a / b ^ i ≤ a * b

tactic: rw [sum_range_zero, zero_mul]
state_before: case zero
α : Type u
β : Type ?u.222007
b : ℕ
hb : 2 ≤ b
a : ℕ
⊢ (∑ i in range zero, a / b ^ i) * (b - 1) ≤ a * b

tactic: exact Nat.zero_le _
state_before: case zero
α : Type u
β : Type ?u.222007
b : ℕ
hb : 2 ≤ b
a : ℕ
⊢ 0 ≤ a * b
Theorem: List.perm_merge
File: Mathlib/Data/List/Sort.lean

tactic: simp [merge]
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
⊢ merge r [] [] ~ [] ++ []

tactic: simp [merge]
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
b : α
l' : List α
⊢ merge r [] (b :: l') ~ [] ++ b :: l'

tactic: simp [merge]
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
⊢ merge r (a :: l) [] ~ a :: l ++ []

tactic: by_cases h : a ≼ b
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
b : α
l' : List α
⊢ merge r (a :: l) (b :: l') ~ a :: l ++ b :: l'

tactic: simpa [merge, h] using perm_merge _ _
state_before: case pos
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
b : α
l' : List α
h : r a b
⊢ merge r (a :: l) (b :: l') ~ a :: l ++ b :: l'

tactic: suffices b :: merge r (a :: l) l' ~ a :: (l ++ b :: l') by simpa [merge, h]
state_before: case neg
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
b : α
l' : List α
h : ¬r a b
⊢ merge r (a :: l) (b :: l') ~ a :: l ++ b :: l'

tactic: exact ((perm_merge _ _).cons _).trans ((swap _ _ _).trans (perm_middle.symm.cons _))
state_before: case neg
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
b : α
l' : List α
h : ¬r a b
⊢ b :: merge r (a :: l) l' ~ a :: (l ++ b :: l')

tactic: simpa [merge, h]
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
b : α
l' : List α
h : ¬r a b
this : b :: merge r (a :: l) l' ~ a :: (l ++ b :: l')
⊢ merge r (a :: l) (b :: l') ~ a :: l ++ b :: l'