tasksource/leandojo huggingface dataset:
Theorem: isOpen_iff_coe_preimage_of_iSup_eq_top
File: Mathlib/Topology/LocalAtTarget.lean

tactic: rw [isOpen_iff_inter_of_iSup_eq_top hU s]
state_before: α : Type ?u.17624
β : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.17643
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
⊢ IsOpen s ↔ ∀ (i : ι), IsOpen (Subtype.val ⁻¹' s)

tactic: refine forall_congr' fun i => ?_
state_before: α : Type ?u.17624
β : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.17643
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
⊢ (∀ (i : ι), IsOpen (s ∩ ↑(U i))) ↔ ∀ (i : ι), IsOpen (Subtype.val ⁻¹' s)

tactic: rw [(U _).2.openEmbedding_subtype_val.open_iff_image_open]
state_before: α : Type ?u.17624
β : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.17643
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
i : ι
⊢ IsOpen (s ∩ ↑(U i)) ↔ IsOpen (Subtype.val ⁻¹' s)

tactic: erw [Set.image_preimage_eq_inter_range]
state_before: α : Type ?u.17624
β : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.17643
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
i : ι
⊢ IsOpen (s ∩ ↑(U i)) ↔ IsOpen (Subtype.val '' (Subtype.val ⁻¹' s))

tactic: rw [Subtype.range_coe, Opens.carrier_eq_coe]
state_before: α : Type ?u.17624
β : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.17643
U : ι → Opens β
hU : iSup U = ⊤
s : Set β
i : ι
⊢ IsOpen (s ∩ ↑(U i)) ↔ IsOpen (s ∩ range Subtype.val)
Theorem: Int.map_fract
File: Mathlib/Algebra/Order/Floor.lean

tactic: simp_rw [fract, map_sub, map_intCast, map_floor _ hf]
state_before: F : Type u_3
α : Type u_1
β : Type u_2
inst✝⁴ : LinearOrderedRing α
inst✝³ : LinearOrderedRing β
inst✝² : FloorRing α
inst✝¹ : FloorRing β
inst✝ : RingHomClass F α β
a✝ : α
b : β
f : F
hf : StrictMono ↑f
a : α
⊢ fract (↑f a) = ↑f (fract a)
Theorem: Stream'.inits_eq
File: Mathlib/Data/Stream/Init.lean

tactic: apply Stream'.ext
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ inits s = [head s] :: map (List.cons (head s)) (inits (tail s))

tactic: intro n
state_before: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ ∀ (n : ℕ), nth (inits s) n = nth ([head s] :: map (List.cons (head s)) (inits (tail s))) n

tactic: cases n
state_before: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
n : ℕ
⊢ nth (inits s) n = nth ([head s] :: map (List.cons (head s)) (inits (tail s))) n

tactic: rfl
state_before: case a.zero
α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ nth (inits s) zero = nth ([head s] :: map (List.cons (head s)) (inits (tail s))) zero

tactic: rw [nth_inits, nth_succ, tail_cons, nth_map, nth_inits]
state_before: case a.succ
α : Type u
β : Type v
δ : Type w
s : Stream' α
n✝ : ℕ
⊢ nth (inits s) (succ n✝) = nth ([head s] :: map (List.cons (head s)) (inits (tail s))) (succ n✝)

tactic: rfl
state_before: case a.succ
α : Type u
β : Type v
δ : Type w
s : Stream' α
n✝ : ℕ
⊢ take (succ (succ n✝)) s = head s :: take (succ n✝) (tail s)
Theorem: InnerProductGeometry.norm_div_cos_angle_add_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [cos_angle_add_of_inner_eq_zero h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0 ∨ y = 0
⊢ ‖x‖ / Real.cos (angle x (x + y)) = ‖x + y‖

tactic: rcases h0 with (h0 | h0)
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0 ∨ y = 0
⊢ ‖x‖ / (‖x‖ / ‖x + y‖) = ‖x + y‖

tactic: rw [div_div_eq_mul_div, mul_comm, div_eq_mul_inv, mul_inv_cancel_right₀ (norm_ne_zero_iff.2 h0)]
state_before: case inl
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0
⊢ ‖x‖ / (‖x‖ / ‖x + y‖) = ‖x + y‖

tactic: simp [h0]
state_before: case inr
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : y = 0
⊢ ‖x‖ / (‖x‖ / ‖x + y‖) = ‖x + y‖
Theorem: MvPolynomial.supported_eq_range_rename
File: Mathlib/Data/MvPolynomial/Supported.lean

tactic: rw [supported, Set.image_eq_range, adjoin_range_eq_range_aeval, rename]
state_before: σ : Type u_1
τ : Type ?u.560
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : Set σ
⊢ supported R s = AlgHom.range (rename Subtype.val)

tactic: congr
state_before: σ : Type u_1
τ : Type ?u.560
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : Set σ
⊢ AlgHom.range (aeval fun x => X ↑x) = AlgHom.range (aeval (X ∘ Subtype.val))
Theorem: nhds_inter_eq_singleton_of_mem_discrete
File: Mathlib/Topology/Separation.lean

tactic: simpa using (𝓝 x).basis_sets.exists_inter_eq_singleton_of_mem_discrete hx
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
s : Set α
inst✝ : DiscreteTopology ↑s
x : α
hx : x ∈ s
⊢ ∃ U, U ∈ 𝓝 x ∧ U ∩ s = {x}
Theorem: Coheyting.boundary_le_boundary_sup_sup_boundary_inf_right
File: Mathlib/Order/Heyting/Boundary.lean

tactic: rw [@sup_comm _ _ a, inf_comm]
state_before: α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ∂ b ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)

tactic: exact boundary_le_boundary_sup_sup_boundary_inf_left
state_before: α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ∂ b ≤ ∂ (b ⊔ a) ⊔ ∂ (b ⊓ a)
Theorem: UniqueFactorizationMonoid.count_normalizedFactors_eq'
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: rcases hp with (rfl | hp)
state_before: α : Type ?u.1182347
R : Type u_1
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : Nontrivial R
inst✝¹ : NormalizationMonoid R
dec_dvd : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
p x : R
hp : p = 0 ∨ Irreducible p
hnorm : ↑normalize p = p
n : ℕ
hle : p ^ n ∣ x
hlt : ¬p ^ (n + 1) ∣ x
⊢ count p (normalizedFactors x) = n

tactic: cases n
state_before: case inl
α : Type ?u.1182347
R : Type u_1
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : Nontrivial R
inst✝¹ : NormalizationMonoid R
dec_dvd : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
x : R
n : ℕ
hnorm : ↑normalize 0 = 0
hle : 0 ^ n ∣ x
hlt : ¬0 ^ (n + 1) ∣ x
⊢ count 0 (normalizedFactors x) = n

tactic: exact count_eq_zero.2 (zero_not_mem_normalizedFactors _)
state_before: case inl.zero
α : Type ?u.1182347
R : Type u_1
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : Nontrivial R
inst✝¹ : NormalizationMonoid R
dec_dvd : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
x : R
hnorm : ↑normalize 0 = 0
hle : 0 ^ Nat.zero ∣ x
hlt : ¬0 ^ (Nat.zero + 1) ∣ x
⊢ count 0 (normalizedFactors x) = Nat.zero

tactic: rw [zero_pow (Nat.succ_pos _)] at hle hlt
state_before: case inl.succ
α : Type ?u.1182347
R : Type u_1
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : Nontrivial R
inst✝¹ : NormalizationMonoid R
dec_dvd : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
x : R
hnorm : ↑normalize 0 = 0
n✝ : ℕ
hle : 0 ^ Nat.succ n✝ ∣ x
hlt : ¬0 ^ (Nat.succ n✝ + 1) ∣ x
⊢ count 0 (normalizedFactors x) = Nat.succ n✝

tactic: exact absurd hle hlt
state_before: case inl.succ
α : Type ?u.1182347
R : Type u_1
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : Nontrivial R
inst✝¹ : NormalizationMonoid R
dec_dvd : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
x : R
hnorm : ↑normalize 0 = 0
n✝ : ℕ
hle : 0 ∣ x
hlt : ¬0 ∣ x
⊢ count 0 (normalizedFactors x) = Nat.succ n✝

tactic: exact count_normalizedFactors_eq hp hnorm hle hlt
state_before: case inr
α : Type ?u.1182347
R : Type u_1
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : Nontrivial R
inst✝¹ : NormalizationMonoid R
dec_dvd : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
p x : R
hnorm : ↑normalize p = p
n : ℕ
hle : p ^ n ∣ x
hlt : ¬p ^ (n + 1) ∣ x
hp : Irreducible p
⊢ count p (normalizedFactors x) = n
Theorem: SimpleGraph.dart_edge_fiber_card
File: Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean

tactic: refine' Sym2.ind (fun v w h => _) e h
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
e : Sym2 V
h : e ∈ edgeSet G
⊢ card (filter (fun d => Dart.edge d = e) univ) = 2

tactic: let d : G.Dart := ⟨(v, w), h⟩
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
e : Sym2 V
h✝ : e ∈ edgeSet G
v w : V
h : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G
⊢ card (filter (fun d => Dart.edge d = Quotient.mk (Sym2.Rel.setoid V) (v, w)) univ) = 2

tactic: convert congr_arg card d.edge_fiber
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
e : Sym2 V
h✝ : e ∈ edgeSet G
v w : V
h : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G
d : Dart G := { toProd := (v, w), is_adj := h }
⊢ card (filter (fun d => Dart.edge d = Quotient.mk (Sym2.Rel.setoid V) (v, w)) univ) = 2

tactic: rw [card_insert_of_not_mem, card_singleton]
state_before: case h.e'_3
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
e : Sym2 V
h✝ : e ∈ edgeSet G
v w : V
h : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G
d : Dart G := { toProd := (v, w), is_adj := h }
⊢ 2 = card {d, Dart.symm d}

tactic: rw [mem_singleton]
state_before: case h.e'_3
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
e : Sym2 V
h✝ : e ∈ edgeSet G
v w : V
h : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G
d : Dart G := { toProd := (v, w), is_adj := h }
⊢ ¬d ∈ {Dart.symm d}

tactic: exact d.symm_ne.symm
state_before: case h.e'_3
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
e : Sym2 V
h✝ : e ∈ edgeSet G
v w : V
h : Quotient.mk (Sym2.Rel.setoid V) (v, w) ∈ edgeSet G
d : Dart G := { toProd := (v, w), is_adj := h }
⊢ ¬d = Dart.symm d
Theorem: List.append_inj'
File: Std/Data/List/Init/Lemmas.lean

tactic: let hap := congrArg length h
state_before: α✝ : Type u_1
s₁ t₁ s₂ t₂ : List α✝
h : s₁ ++ t₁ = s₂ ++ t₂
hl : length t₁ = length t₂
⊢ length s₁ + length t₁ = length s₂ + length t₁

tactic: simp only [length_append, ← hl] at hap
state_before: α✝ : Type u_1
s₁ t₁ s₂ t₂ : List α✝
h : s₁ ++ t₁ = s₂ ++ t₂
hl : length t₁ = length t₂
hap : length (s₁ ++ t₁) = length (s₂ ++ t₂) := congrArg length h
⊢ length s₁ + length t₁ = length s₂ + length t₁

tactic: exact hap
state_before: α✝ : Type u_1
s₁ t₁ s₂ t₂ : List α✝
h : s₁ ++ t₁ = s₂ ++ t₂
hl : length t₁ = length t₂
hap : length s₁ + length t₁ = length s₂ + length t₁
⊢ length s₁ + length t₁ = length s₂ + length t₁
Theorem: Multiset.toFinset_dedup
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [toFinset, dedup_idempotent]
state_before: α : Type u_1
β : Type ?u.453504
γ : Type ?u.453507
inst✝ : DecidableEq α
s t m : Multiset α
⊢ toFinset (dedup m) = toFinset m
Theorem: toIocDiv_add_zsmul
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [add_smul, add_sub_add_right_eq_sub] using sub_toIocDiv_zsmul_mem_Ioc hp a b
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b + m • p - (toIocDiv hp a b + m) • p ∈ Set.Ioc a (a + p)
Theorem: Finset.min'_image
File: Mathlib/Data/Finset/Lattice.lean

tactic: refine'
  le_antisymm (min'_le _ _ (mem_image.mpr ⟨_, min'_mem _ _, rfl⟩)) (le_min' _ _ _ fun y hy => _)
state_before: F : Type ?u.366451
α : Type u_2
β : Type u_1
γ : Type ?u.366460
ι : Type ?u.366463
κ : Type ?u.366466
inst✝¹ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
inst✝ : LinearOrder β
f : α → β
hf : Monotone f
s : Finset α
h : Finset.Nonempty (image f s)
⊢ min' (image f s) h = f (min' s (_ : Finset.Nonempty s))

tactic: obtain ⟨x, hx, rfl⟩ := mem_image.mp hy
state_before: F : Type ?u.366451
α : Type u_2
β : Type u_1
γ : Type ?u.366460
ι : Type ?u.366463
κ : Type ?u.366466
inst✝¹ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
inst✝ : LinearOrder β
f : α → β
hf : Monotone f
s : Finset α
h : Finset.Nonempty (image f s)
y : β
hy : y ∈ image f s
⊢ f (min' s (_ : Finset.Nonempty s)) ≤ y

tactic: exact hf (min'_le _ _ hx)
state_before: case intro.intro
F : Type ?u.366451
α : Type u_2
β : Type u_1
γ : Type ?u.366460
ι : Type ?u.366463
κ : Type ?u.366466
inst✝¹ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x✝ : α
inst✝ : LinearOrder β
f : α → β
hf : Monotone f
s : Finset α
h : Finset.Nonempty (image f s)
x : α
hx : x ∈ s
hy : f x ∈ image f s
⊢ f (min' s (_ : Finset.Nonempty s)) ≤ f x
Theorem: CategoryTheory.GrothendieckTopology.isGLB_sInf
File: Mathlib/CategoryTheory/Sites/Grothendieck.lean

tactic: refine' @IsGLB.of_image _ _ _ _ sieves _ _ _ _
state_before: C : Type u
inst✝ : Category C
X Y : C
S R : Sieve X
J : GrothendieckTopology C
s : Set (GrothendieckTopology C)
⊢ IsGLB s (sInf s)

tactic: intros
state_before: case refine'_1
C : Type u
inst✝ : Category C
X Y : C
S R : Sieve X
J : GrothendieckTopology C
s : Set (GrothendieckTopology C)
⊢ ∀ {x y : GrothendieckTopology C}, x.sieves ≤ y.sieves ↔ x ≤ y

tactic: rfl
state_before: case refine'_1
C : Type u
inst✝ : Category C
X Y : C
S R : Sieve X
J : GrothendieckTopology C
s : Set (GrothendieckTopology C)
x✝ y✝ : GrothendieckTopology C
⊢ x✝.sieves ≤ y✝.sieves ↔ x✝ ≤ y✝

tactic: exact _root_.isGLB_sInf _
state_before: case refine'_2
C : Type u
inst✝ : Category C
X Y : C
S R : Sieve X
J : GrothendieckTopology C
s : Set (GrothendieckTopology C)
⊢ IsGLB (sieves '' s) (sInf s).sieves
Theorem: Finsupp.update_self
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
  ext
  simp
state_before: α : Type u_1
β : Type ?u.148539
γ : Type ?u.148542
ι : Type ?u.148545
M : Type u_2
M' : Type ?u.148551
N : Type ?u.148554
P : Type ?u.148557
G : Type ?u.148560
H : Type ?u.148563
R : Type ?u.148566
S : Type ?u.148569
inst✝ : Zero M
f : α →₀ M
a : α
b : M
i : α
⊢ update f a (↑f a) = f

tactic: ext
state_before: α : Type u_1
β : Type ?u.148539
γ : Type ?u.148542
ι : Type ?u.148545
M : Type u_2
M' : Type ?u.148551
N : Type ?u.148554
P : Type ?u.148557
G : Type ?u.148560
H : Type ?u.148563
R : Type ?u.148566
S : Type ?u.148569
inst✝ : Zero M
f : α →₀ M
a : α
b : M
i : α
⊢ update f a (↑f a) = f

tactic: simp
state_before: case h
α : Type u_1
β : Type ?u.148539
γ : Type ?u.148542
ι : Type ?u.148545
M : Type u_2
M' : Type ?u.148551
N : Type ?u.148554
P : Type ?u.148557
G : Type ?u.148560
H : Type ?u.148563
R : Type ?u.148566
S : Type ?u.148569
inst✝ : Zero M
f : α →₀ M
a : α
b : M
i a✝ : α
⊢ ↑(update f a (↑f a)) a✝ = ↑f a✝
Theorem: continuousAt_update_same
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [← continuousWithinAt_univ, continuousWithinAt_update_same, compl_eq_univ_diff]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.328491
δ : Type ?u.328494
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
inst✝ : DecidableEq α
f : α → β
x : α
y : β
⊢ ContinuousAt (update f x y) x ↔ Tendsto f (𝓝[{x}ᶜ] x) (𝓝 y)
Theorem: Algebra.adjoin_empty
File: Mathlib/RingTheory/Adjoin/Basic.lean

tactic: apply GaloisConnection.l_bot
state_before: R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s t : Set A
⊢ adjoin R ⊥ = ⊥

tactic: exact Algebra.gc
state_before: case gc
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s t : Set A
⊢ GaloisConnection (adjoin R) ?u

case u
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s t : Set A
⊢ Subalgebra R A → Set A
Theorem: Multiset.count_inter
File: Mathlib/Data/Multiset/Basic.lean

tactic: apply @Nat.add_left_cancel (count a (s - t))
state_before: α : Type u_1
β : Type ?u.394964
γ : Type ?u.394967
inst✝ : DecidableEq α
a : α
s t : Multiset α
⊢ count a (s ∩ t) = min (count a s) (count a t)

tactic: rw [← count_add, sub_add_inter, count_sub, tsub_add_min]
state_before: case a
α : Type u_1
β : Type ?u.394964
γ : Type ?u.394967
inst✝ : DecidableEq α
a : α
s t : Multiset α
⊢ count a (s - t) + count a (s ∩ t) = count a (s - t) + min (count a s) (count a t)
Theorem: LocalEquiv.refl_restr_source
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.40873
γ : Type ?u.40876
δ : Type ?u.40879
e : LocalEquiv α β
e' : LocalEquiv β γ
s : Set α
⊢ (LocalEquiv.restr (LocalEquiv.refl α) s).source = s
Theorem: List.reduceOption_cons_of_none
File: Mathlib/Data/List/Basic.lean

tactic: simp only [reduceOption, filterMap, id.def]
state_before: ι : Type ?u.349293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
l : List (Option α)
⊢ reduceOption (none :: l) = reduceOption l
Theorem: Nat.Prime.pow_dvd_factorial_iff
File: Mathlib/Data/Nat/Multiplicity.lean

tactic: rw [← PartENat.coe_le_coe, ← hp.multiplicity_factorial hbn, ← pow_dvd_iff_le_multiplicity]
state_before: p n r b : ℕ
hp : Prime p
hbn : log p n < b
⊢ p ^ r ∣ n ! ↔ r ≤ ∑ i in Ico 1 b, n / p ^ i
Theorem: Filter.bliminf_antitone
File: Mathlib/Order/LiminfLimsup.lean

tactic: tauto
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.132666
ι : Type ?u.132669
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
h : ∀ (x : β), p x → q x
a : α
ha : a ∈ {a | ∀ᶠ (x : β) in f, q x → a ≤ u x}
⊢ ∀ (x : β), (q x → a ≤ u x) → p x → a ≤ u x
Theorem: DvdNotUnit.not_associated
File: Mathlib/Algebra/Associated.lean

tactic: rintro ⟨a, rfl⟩
state_before: α : Type u_1
β : Type ?u.354581
γ : Type ?u.354584
δ : Type ?u.354587
inst✝ : CancelCommMonoidWithZero α
p q : α
h : DvdNotUnit p q
⊢ ¬p ~ᵤ q

tactic: obtain ⟨hp, x, hx, hx'⟩ := h
state_before: case intro
α : Type u_1
β : Type ?u.354581
γ : Type ?u.354584
δ : Type ?u.354587
inst✝ : CancelCommMonoidWithZero α
p : α
a : αˣ
h : DvdNotUnit p (p * ↑a)
⊢ False

tactic: rcases(mul_right_inj' hp).mp hx' with rfl
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.354581
γ : Type ?u.354584
δ : Type ?u.354587
inst✝ : CancelCommMonoidWithZero α
p : α
a : αˣ
hp : p ≠ 0
x : α
hx : ¬IsUnit x
hx' : p * ↑a = p * x
⊢ False

tactic: exact hx a.isUnit
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.354581
γ : Type ?u.354584
δ : Type ?u.354587
inst✝ : CancelCommMonoidWithZero α
p : α
a : αˣ
hp : p ≠ 0
hx : ¬IsUnit ↑a
hx' : p * ↑a = p * ↑a
⊢ False
Theorem: IsSubmonoid.finset_prod_mem
File: Mathlib/Deprecated/Submonoid.lean

tactic: simpa
state_before: M✝ : Type ?u.56585
inst✝² : Monoid M✝
s✝ : Set M✝
A✝ : Type ?u.56594
inst✝¹ : AddMonoid A✝
t : Set A✝
M : Type u_1
A : Type u_2
inst✝ : CommMonoid M
s : Set M
hs : IsSubmonoid s
f : A → M
m : Multiset A
hm : Multiset.Nodup m
x✝ : ∀ (b : A), b ∈ { val := m, nodup := hm } → f b ∈ s
⊢ ∀ (a : M), a ∈ Multiset.map (fun b => f b) { val := m, nodup := hm }.val → a ∈ s
Theorem: CategoryTheory.MonoidalCategory.associator_conjugation
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [associator_inv_naturality, hom_inv_id_assoc]
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z✝ X X' Y Y' Z Z' : C
f : X ⟶ X'
g : Y ⟶ Y'
h : Z ⟶ Z'
⊢ (f ⊗ g) ⊗ h = (α_ X Y Z).hom ≫ (f ⊗ g ⊗ h) ≫ (α_ X' Y' Z').inv
Theorem: OrderIso.image_Ioc
File: Mathlib/Data/Set/Intervals/OrderIso.lean

tactic: rw [e.image_eq_preimage, e.symm.preimage_Ioc, e.symm_symm]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
a b : α
⊢ ↑e '' Ioc a b = Ioc (↑e a) (↑e b)
Theorem: Finset.prod_biUnion
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [← disjiUnion_eq_biUnion _ _ hs, prod_disjiUnion]
state_before: ι : Type ?u.311298
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s : Finset γ
t : γ → Finset α
hs : Set.PairwiseDisjoint (↑s) t
⊢ ∏ x in Finset.biUnion s t, f x = ∏ x in s, ∏ i in t x, f i
Theorem: PowerBasis.dim_le_degree_of_root
File: Mathlib/RingTheory/PowerBasis.lean

tactic: rw [degree_eq_natDegree ne_zero]
state_before: R : Type ?u.124871
S : Type u_2
T : Type ?u.124877
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_1
B : Type ?u.125183
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type ?u.125605
inst✝¹ : Field K
inst✝ : Algebra A S
h : PowerBasis A S
p : A[X]
ne_zero : p ≠ 0
root : ↑(aeval h.gen) p = 0
⊢ ↑h.dim ≤ degree p

tactic: exact WithBot.coe_le_coe.2 (h.dim_le_natDegree_of_root ne_zero root)
state_before: R : Type ?u.124871
S : Type u_2
T : Type ?u.124877
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_1
B : Type ?u.125183
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type ?u.125605
inst✝¹ : Field K
inst✝ : Algebra A S
h : PowerBasis A S
p : A[X]
ne_zero : p ≠ 0
root : ↑(aeval h.gen) p = 0
⊢ ↑h.dim ≤ ↑(natDegree p)
Theorem: toIcoDiv_sub'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [one_zsmul] using toIcoDiv_sub_zsmul' hp a b 1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp (a - p) b = toIcoDiv hp a b + 1
Theorem: inv_eq_of_mul_eq_one_left
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [← inv_eq_of_mul_eq_one_right h, inv_inv]
state_before: α : Type u_1
β : Type ?u.21054
G : Type ?u.21057
inst✝ : DivisionMonoid α
a b c : α
h : a * b = 1
⊢ b⁻¹ = a