tasksource/leandojo huggingface dataset:
Theorem: LinearMap.submoduleImage_apply_ofLe
File: Mathlib/LinearAlgebra/Basic.lean

tactic: rw [submoduleImage, range_comp, Submodule.range_ofLe]
state_before: R : Type u_2
R₁ : Type ?u.1593776
R₂ : Type ?u.1593779
R₃ : Type ?u.1593782
R₄ : Type ?u.1593785
S : Type ?u.1593788
K : Type ?u.1593791
K₂ : Type ?u.1593794
M : Type u_3
M'✝ : Type ?u.1593800
M₁ : Type ?u.1593803
M₂ : Type ?u.1593806
M₃ : Type ?u.1593809
M₄ : Type ?u.1593812
N✝ : Type ?u.1593815
N₂ : Type ?u.1593818
ι : Type ?u.1593821
V : Type ?u.1593824
V₂ : Type ?u.1593827
inst✝¹¹ : Semiring R
inst✝¹⁰ : Semiring R₂
inst✝⁹ : Semiring R₃
inst✝⁸ : AddCommMonoid M
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : AddCommMonoid M₃
inst✝⁵ : Module R M
inst✝⁴ : Module R₂ M₂
inst✝³ : Module R₃ M₃
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
M' : Type u_1
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
O : Submodule R M
ϕ : { x // x ∈ O } →ₗ[R] M'
N : Submodule R M
hNO : N ≤ O
⊢ submoduleImage ϕ N = range (comp ϕ (Submodule.ofLe hNO))
Theorem: Nat.ArithmeticFunction.moebius_ne_zero_iff_squarefree
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: constructor <;> intro h
state_before: R : Type ?u.580497
n : ℕ
⊢ ↑μ n ≠ 0 ↔ Squarefree n

tactic: contrapose! h
state_before: case mp
R : Type ?u.580497
n : ℕ
h : ↑μ n ≠ 0
⊢ Squarefree n

tactic: simp [h]
state_before: case mp
R : Type ?u.580497
n : ℕ
h : ¬Squarefree n
⊢ ↑μ n = 0

tactic: simp [h, pow_ne_zero]
state_before: case mpr
R : Type ?u.580497
n : ℕ
h : Squarefree n
⊢ ↑μ n ≠ 0
Theorem: Multiset.filter_eq
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp_rw [← filter_eq', eq_comm]
state_before: α : Type u_1
β : Type ?u.421151
γ : Type ?u.421154
inst✝ : DecidableEq α
s : Multiset α
b : α
⊢ filter (Eq b) s = replicate (count b s) b
Theorem: List.rdrop_nil
File: Mathlib/Data/List/Rdrop.lean

tactic: simp [rdrop]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdrop [] n = []
Theorem: Submodule.torsionBy_one
File: Mathlib/Algebra/Module/Torsion.lean

tactic: rw [mem_torsionBy_iff, one_smul] at h
state_before: R : Type u_2
M : Type u_1
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
a : R
x✝ : M
h : x✝ ∈ torsionBy R M 1
⊢ x✝ ∈ ⊥

tactic: exact h
state_before: R : Type u_2
M : Type u_1
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set R
a : R
x✝ : M
h : x✝ = 0
⊢ x✝ ∈ ⊥
Theorem: Set.mk_preimage_prod_right
File: Mathlib/Data/Set/Prod.lean

tactic: ext b
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.26152
δ : Type ?u.26155
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
ha : a ∈ s
⊢ Prod.mk a ⁻¹' s ×ˢ t = t

tactic: simp [ha]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.26152
δ : Type ?u.26155
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b✝ : β
ha : a ∈ s
b : β
⊢ b ∈ Prod.mk a ⁻¹' s ×ˢ t ↔ b ∈ t
Theorem: MvPolynomial.vars_pow
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: induction' n with n ih
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.165103
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q φ : MvPolynomial σ R
n : ℕ
⊢ vars (φ ^ n) ⊆ vars φ

tactic: simp
state_before: case zero
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.165103
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q φ : MvPolynomial σ R
⊢ vars (φ ^ Nat.zero) ⊆ vars φ

tactic: rw [pow_succ]
state_before: case succ
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.165103
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q φ : MvPolynomial σ R
n : ℕ
ih : vars (φ ^ n) ⊆ vars φ
⊢ vars (φ ^ Nat.succ n) ⊆ vars φ

tactic: apply Finset.Subset.trans (vars_mul _ _)
state_before: case succ
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.165103
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q φ : MvPolynomial σ R
n : ℕ
ih : vars (φ ^ n) ⊆ vars φ
⊢ vars (φ * φ ^ n) ⊆ vars φ

tactic: exact Finset.union_subset (Finset.Subset.refl _) ih
state_before: case succ
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.165103
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q φ : MvPolynomial σ R
n : ℕ
ih : vars (φ ^ n) ⊆ vars φ
⊢ vars φ ∪ vars (φ ^ n) ⊆ vars φ
Theorem: MeasureTheory.Lp.simpleFunc.zero_toSimpleFunc
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

tactic: filter_upwards [toSimpleFunc_eq_toFun (0 : Lp.simpleFunc E p μ),
  Lp.coeFn_zero E 1 μ] with _ h₁ _
state_before: α : Type u_1
β : Type ?u.1580552
ι : Type ?u.1580555
E : Type u_2
F : Type ?u.1580561
𝕜 : Type ?u.1580564
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
⊢ ↑(toSimpleFunc 0) =ᵐ[μ] 0

tactic: rwa [h₁]
state_before: case h
α : Type u_1
β : Type ?u.1580552
ι : Type ?u.1580555
E : Type u_2
F : Type ?u.1580561
𝕜 : Type ?u.1580564
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
a✝¹ : α
h₁ : ↑(toSimpleFunc 0) a✝¹ = ↑↑↑0 a✝¹
a✝ : ↑↑0 a✝¹ = OfNat.ofNat 0 a✝¹
⊢ ↑(toSimpleFunc 0) a✝¹ = OfNat.ofNat 0 a✝¹
Theorem: EMetric.diam_iUnion_mem_option
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: cases o <;> simp
state_before: α : Type u
β : Type v
X : Type ?u.286785
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t : Set α
ι : Type u_1
o : Option ι
s : ι → Set α
⊢ diam (⋃ (i : ι) (_ : i ∈ o), s i) = ⨆ (i : ι) (_ : i ∈ o), diam (s i)
Theorem: MvPowerSeries.mul_add
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: simp only [coeff_mul, mul_add, Finset.sum_add_distrib, LinearMap.map_add]
state_before: σ : Type u_1
R : Type u_2
inst✝ : Semiring R
m n✝ : σ →₀ ℕ
φ ψ φ₁ φ₂ φ₃ : MvPowerSeries σ R
n : σ →₀ ℕ
⊢ ↑(coeff R n) (φ₁ * (φ₂ + φ₃)) = ↑(coeff R n) (φ₁ * φ₂ + φ₁ * φ₃)
Theorem: CategoryTheory.Grothendieck.id_fiber'
File: Mathlib/CategoryTheory/Grothendieck.lean

tactic: erw [CategoryTheory.Functor.map_id, Functor.id_obj X.fiber]
state_before: C : Type ?u.14362
D : Type ?u.14365
inst✝¹ : Category C
inst✝ : Category D
F : C ⥤ Cat
X : Grothendieck F
⊢ (F.map (𝟙 X).base).obj X.fiber = X.fiber
Theorem: IsPrimitiveRoot.pow_eq_one_iff_dvd
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: rintro ⟨i, rfl⟩
state_before: M : Type u_1
N : Type ?u.1660609
G : Type ?u.1660612
R : Type ?u.1660615
S : Type ?u.1660618
F : Type ?u.1660621
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h : IsPrimitiveRoot ζ k
l : ℕ
⊢ k ∣ l → ζ ^ l = 1

tactic: simp only [pow_mul, h.pow_eq_one, one_pow, PNat.mul_coe]
state_before: case intro
M : Type u_1
N : Type ?u.1660609
G : Type ?u.1660612
R : Type ?u.1660615
S : Type ?u.1660618
F : Type ?u.1660621
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h : IsPrimitiveRoot ζ k
i : ℕ
⊢ ζ ^ (k * i) = 1
Theorem: Mathlib.Meta.NormNum.isRat_inv_one
File: Mathlib/Tactic/NormNum/Basic.lean

tactic: simp
state_before: α : Type u_1
inst✝ : DivisionRing α
⊢ (↑1)⁻¹ = ↑1
Theorem: IsCoprime.pow_left
File: Mathlib/RingTheory/Coprime/Lemmas.lean

tactic: rw [← Finset.card_range m, ← Finset.prod_const]
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℕ
H : IsCoprime x y
⊢ IsCoprime (x ^ m) y

tactic: exact IsCoprime.prod_left fun _ _ ↦ H
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℕ
H : IsCoprime x y
⊢ IsCoprime (∏ _x in range m, x) y
Theorem: NormedAddGroupHom.toAddMonoidHom_injective
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: rw [←coe_toAddMonoidHom f, ←coe_toAddMonoidHom g, h]
state_before: V : Type ?u.210329
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.210338
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f✝ g✝ f g : NormedAddGroupHom V₁ V₂
h : toAddMonoidHom f = toAddMonoidHom g
⊢ ↑f = ↑g
Theorem: List.drop_eq_nil_of_le
File: src/lean/Init/Data/List/Basic.lean

tactic: match as, i with
| [],    i   => simp
| _::_,  0   => simp at h
| _::as, i+1 => simp at h; exact @drop_eq_nil_of_le as i (Nat.le_of_succ_le_succ h)
state_before: α : Type u
β : Type v
γ : Type w
as : List α
i : Nat
h : length as ≤ i
⊢ drop i as = nil

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
as : List α
i✝ i : Nat
h : length nil ≤ i
⊢ drop i nil = nil

tactic: simp at h
state_before: α : Type u
β : Type v
γ : Type w
as : List α
i : Nat
head✝ : α
tail✝ : List α
h : length (head✝ :: tail✝) ≤ 0
⊢ drop 0 (head✝ :: tail✝) = nil

tactic: simp at h
state_before: α : Type u
β : Type v
γ : Type w
as✝ : List α
i✝ : Nat
head✝ : α
as : List α
i : Nat
h : length (head✝ :: as) ≤ i + 1
⊢ drop (i + 1) (head✝ :: as) = nil

tactic: exact @drop_eq_nil_of_le as i (Nat.le_of_succ_le_succ h)
state_before: α : Type u
β : Type v
γ : Type w
as✝ : List α
i✝ : Nat
head✝ : α
as : List α
i : Nat
h : Nat.succ (length as) ≤ i + 1
⊢ drop (i + 1) (head✝ :: as) = nil
Theorem: CategoryTheory.Limits.colimit.ι_pre
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: erw [IsColimit.fac]
state_before: J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F : J ⥤ C
inst✝¹ : HasColimit F
E : K ⥤ J
inst✝ : HasColimit (E ⋙ F)
k : K
⊢ ι (E ⋙ F) k ≫ pre F E = ι F (E.obj k)

tactic: rfl
state_before: J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F : J ⥤ C
inst✝¹ : HasColimit F
E : K ⥤ J
inst✝ : HasColimit (E ⋙ F)
k : K
⊢ (Cocone.whisker E (cocone F)).ι.app k = ι F (E.obj k)
Theorem: SimpleGraph.Walk.count_support_takeUntil_eq_one
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G v w
h : u ∈ support p
⊢ List.count u (support (takeUntil p u h)) = 1

tactic: rw [mem_support_nil_iff] at h
state_before: case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w u✝ : V
h : u ∈ support nil
⊢ List.count u (support (takeUntil nil u h)) = 1

tactic: subst u
state_before: case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w u✝ : V
h✝ : u ∈ support nil
h : u = u✝
⊢ List.count u (support (takeUntil nil u h✝)) = 1

tactic: simp!
state_before: case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
v w u✝ : V
h : u✝ ∈ support nil
⊢ List.count u✝ (support (takeUntil nil u✝ h)) = 1

tactic: cases h
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1
h : u ∈ support (cons h✝ p✝)
⊢ List.count u (support (takeUntil (cons h✝ p✝) u h)) = 1

tactic: simp!
state_before: case cons.head
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w v✝ w✝ : V
p✝ : Walk G v✝ w✝
p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1
h✝ : Adj G u v✝
⊢ List.count u (support (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝)))) = 1

tactic: simp! only
state_before: case cons.tail
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1
a✝ : List.Mem u (support p✝)
⊢ List.count u (support (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝)))) = 1

tactic: split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
state_before: case cons.tail
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1
a✝ : List.Mem u (support p✝)
⊢ List.count u
      (support
        (if h : u✝ = u then
          Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G u✝ x) (fun h => nil) (_ : u✝ = u)
            (_ : List.Mem u (u✝ :: support p✝))
        else cons h✝ (takeUntil p✝ u (_ : u ∈ support p✝)))) =
    1
Theorem: Submodule.disjoint_iff_comap_eq_bot
File: Mathlib/LinearAlgebra/Basic.lean

tactic: rw [← (map_injective_of_injective (show Injective p.subtype from Subtype.coe_injective)).eq_iff,
  map_comap_subtype, map_bot, disjoint_iff]
state_before: R : Type u_1
R₁ : Type ?u.1554584
R₂ : Type ?u.1554587
R₃ : Type ?u.1554590
R₄ : Type ?u.1554593
S : Type ?u.1554596
K : Type ?u.1554599
K₂ : Type ?u.1554602
M : Type u_2
M' : Type ?u.1554608
M₁ : Type ?u.1554611
M₂ : Type ?u.1554614
M₃ : Type ?u.1554617
M₄ : Type ?u.1554620
N : Type ?u.1554623
N₂ : Type ?u.1554626
ι : Type ?u.1554629
V : Type ?u.1554632
V₂ : Type ?u.1554635
inst✝⁵ : Semiring R
inst✝⁴ : Semiring R₂
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
p✝ p' : Submodule R M
q✝ : Submodule R₂ M₂
τ₁₂ : R →+* R₂
F : Type ?u.1554809
sc : SemilinearMapClass F τ₁₂ M M₂
p q : Submodule R M
⊢ Disjoint p q ↔ comap (Submodule.subtype p) q = ⊥
Theorem: List.reduceOption_map
File: Mathlib/Data/List/Basic.lean

tactic: induction' l with hd tl hl
state_before: ι : Type ?u.349607
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
l : List (Option α)
f : α → β
⊢ reduceOption (map (Option.map f) l) = map f (reduceOption l)

tactic: simp only [reduceOption_nil, map_nil]
state_before: case nil
ι : Type ?u.349607
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β
⊢ reduceOption (map (Option.map f) []) = map f (reduceOption [])

tactic: cases hd <;>
   simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
     reduceOption_cons_of_some] using hl
state_before: case cons
ι : Type ?u.349607
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β
hd : Option α
tl : List (Option α)
hl : reduceOption (map (Option.map f) tl) = map f (reduceOption tl)
⊢ reduceOption (map (Option.map f) (hd :: tl)) = map f (reduceOption (hd :: tl))
Theorem: Polynomial.chebyshev_T_eq_dickson_one_one
File: Mathlib/RingTheory/Polynomial/Dickson.lean

tactic: rw [dickson_one_one_eq_chebyshev_T, mul_comp, ofNat_comp, comp_assoc, mul_comp, C_comp, X_comp]
state_before: R : Type u_1
S : Type ?u.201283
inst✝² : CommRing R
inst✝¹ : CommRing S
k : ℕ
a : R
inst✝ : Invertible 2
n : ℕ
⊢ Chebyshev.T R n = ↑C ⅟2 * comp (dickson 1 1 n) (2 * X)

tactic: simp_rw [← mul_assoc, Nat.cast_ofNat, C_half_mul_two_eq_one, one_mul, comp_X]
state_before: R : Type u_1
S : Type ?u.201283
inst✝² : CommRing R
inst✝¹ : CommRing S
k : ℕ
a : R
inst✝ : Invertible 2
n : ℕ
⊢ Chebyshev.T R n = ↑C ⅟2 * (↑2 * comp (Chebyshev.T R n) (↑C ⅟2 * (2 * X)))
Theorem: Set.Countable.exists_eq_range
File: Mathlib/Data/Set/Countable.lean

tactic: rcases hc.exists_surjective hs with ⟨f, hf⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
hc : Set.Countable s
hs : Set.Nonempty s
⊢ ∃ f, s = range f

tactic: refine' ⟨(↑) ∘ f, _⟩
state_before: case intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
hc : Set.Countable s
hs : Set.Nonempty s
f : ℕ → ↑s
hf : Surjective f
⊢ ∃ f, s = range f

tactic: rw [hf.range_comp, Subtype.range_coe]
state_before: case intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
hc : Set.Countable s
hs : Set.Nonempty s
f : ℕ → ↑s
hf : Surjective f
⊢ s = range (Subtype.val ∘ f)
Theorem: Filter.HasBasis.sInter_sets
File: Mathlib/Order/Filter/Bases.lean

tactic: rw [sInter_eq_biInter]
state_before: α : Type u_1
β : Type ?u.68520
γ : Type ?u.68523
ι : Sort u_2
ι' : Sort ?u.68529
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : HasBasis l p s
⊢ ⋂₀ l.sets = ⋂ (i : ι) (_ : p i), s i

tactic: exact h.biInter_mem monotone_id
state_before: α : Type u_1
β : Type ?u.68520
γ : Type ?u.68523
ι : Sort u_2
ι' : Sort ?u.68529
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : HasBasis l p s
⊢ (⋂ (i : Set α) (_ : i ∈ l.sets), i) = ⋂ (i : ι) (_ : p i), s i
Theorem: Ordinal.omega_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: let ⟨n, e⟩ := lt_omega.1 h
state_before: o : Ordinal
H : ∀ (n : ℕ), ↑n ≤ o
a : Ordinal
h : a < ω
⊢ a < o

tactic: rw [e, ← succ_le_iff]
state_before: o : Ordinal
H : ∀ (n : ℕ), ↑n ≤ o
a : Ordinal
h : a < ω
n : ℕ
e : a = ↑n
⊢ a < o

tactic: exact H (n + 1)
state_before: o : Ordinal
H : ∀ (n : ℕ), ↑n ≤ o
a : Ordinal
h : a < ω
n : ℕ
e : a = ↑n
⊢ succ ↑n ≤ o
Theorem: AddMonoidHom.completion_zero
File: Mathlib/Topology/Algebra/GroupCompletion.lean

tactic: ext x
state_before: M : Type ?u.263181
R : Type ?u.263184
α : Type u_1
β : Type u_2
inst✝⁵ : UniformSpace α
inst✝⁴ : AddGroup α
inst✝³ : UniformAddGroup α
inst✝² : UniformSpace β
inst✝¹ : AddGroup β
inst✝ : UniformAddGroup β
⊢ completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1) = 0

tactic: refine Completion.induction_on x ?_ ?_
state_before: case h
M : Type ?u.263181
R : Type ?u.263184
α : Type u_1
β : Type u_2
inst✝⁵ : UniformSpace α
inst✝⁴ : AddGroup α
inst✝³ : UniformAddGroup α
inst✝² : UniformSpace β
inst✝¹ : AddGroup β
inst✝ : UniformAddGroup β
x : Completion α
⊢ ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) x = ↑0 x

tactic: apply isClosed_eq (AddMonoidHom.continuous_completion (0 : α →+ β) continuous_const)
state_before: case h.refine_1
M : Type ?u.263181
R : Type ?u.263184
α : Type u_1
β : Type u_2
inst✝⁵ : UniformSpace α
inst✝⁴ : AddGroup α
inst✝³ : UniformAddGroup α
inst✝² : UniformSpace β
inst✝¹ : AddGroup β
inst✝ : UniformAddGroup β
x : Completion α
⊢ IsClosed {a | ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) a = ↑0 a}

tactic: simp [continuous_const]
state_before: case h.refine_1
M : Type ?u.263181
R : Type ?u.263184
α : Type u_1
β : Type u_2
inst✝⁵ : UniformSpace α
inst✝⁴ : AddGroup α
inst✝³ : UniformAddGroup α
inst✝² : UniformSpace β
inst✝¹ : AddGroup β
inst✝ : UniformAddGroup β
x : Completion α
⊢ Continuous fun x => ↑0 x

tactic: intro a
state_before: case h.refine_2
M : Type ?u.263181
R : Type ?u.263184
α : Type u_1
β : Type u_2
inst✝⁵ : UniformSpace α
inst✝⁴ : AddGroup α
inst✝³ : UniformAddGroup α
inst✝² : UniformSpace β
inst✝¹ : AddGroup β
inst✝ : UniformAddGroup β
x : Completion α
⊢ ∀ (a : α), ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) (↑α a) = ↑0 (↑α a)

tactic: simp [(0 : α →+ β).completion_coe continuous_const, coe_zero]
state_before: case h.refine_2
M : Type ?u.263181
R : Type ?u.263184
α : Type u_1
β : Type u_2
inst✝⁵ : UniformSpace α
inst✝⁴ : AddGroup α
inst✝³ : UniformAddGroup α
inst✝² : UniformSpace β
inst✝¹ : AddGroup β
inst✝ : UniformAddGroup β
x : Completion α
a : α
⊢ ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) (↑α a) = ↑0 (↑α a)
Theorem: Cardinal.mk_subset_ge_of_subset_image_lift
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [image_eq_range] at h
state_before: α✝ β✝ α : Type u
β : Type v
f : α → β
s : Set α
t : Set β
h : t ⊆ f '' s
⊢ lift (#↑t) ≤ lift (#↑{x | x ∈ s ∧ f x ∈ t})

tactic: convert mk_preimage_of_subset_range_lift _ _ h using 1
state_before: α✝ β✝ α : Type u
β : Type v
f : α → β
s : Set α
t : Set β
h : t ⊆ range fun x => f ↑x
⊢ lift (#↑t) ≤ lift (#↑{x | x ∈ s ∧ f x ∈ t})

tactic: rw [mk_sep]
state_before: case h.e'_4
α✝ β✝ α : Type u
β : Type v
f : α → β
s : Set α
t : Set β
h : t ⊆ range fun x => f ↑x
⊢ lift (#↑{x | x ∈ s ∧ f x ∈ t}) = lift (#↑((fun x => f ↑x) ⁻¹' t))

tactic: rfl
state_before: case h.e'_4
α✝ β✝ α : Type u
β : Type v
f : α → β
s : Set α
t : Set β
h : t ⊆ range fun x => f ↑x
⊢ lift (#↑{x | f ↑x ∈ t}) = lift (#↑((fun x => f ↑x) ⁻¹' t))
Theorem: isIntegral_smul
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: rw [Algebra.smul_def, IsScalarTower.algebraMap_apply R S A]
state_before: R : Type u_3
A : Type u_2
B : Type ?u.660893
S : Type u_1
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R A
inst✝³ : Algebra R B
f : R →+* S
inst✝² : Algebra S A
inst✝¹ : Algebra R S
inst✝ : IsScalarTower R S A
x : A
r : R
hx : IsIntegral S x
⊢ IsIntegral S (r • x)

tactic: exact isIntegral_mul isIntegral_algebraMap hx
state_before: R : Type u_3
A : Type u_2
B : Type ?u.660893
S : Type u_1
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R A
inst✝³ : Algebra R B
f : R →+* S
inst✝² : Algebra S A
inst✝¹ : Algebra R S
inst✝ : IsScalarTower R S A
x : A
r : R
hx : IsIntegral S x
⊢ IsIntegral S (↑(algebraMap S A) (↑(algebraMap R S) r) * x)
Theorem: hammingDist_lt_one
File: Mathlib/InformationTheory/Hamming.lean

tactic: rw [Nat.lt_one_iff, hammingDist_eq_zero]
state_before: α : Type ?u.13215
ι : Type u_1
β : ι → Type u_2
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type ?u.13247
inst✝ : (i : ι) → DecidableEq (γ i)
x y : (i : ι) → β i
⊢ hammingDist x y < 1 ↔ x = y
Theorem: Nat.Linear.Poly.denote_fuse
File: src/lean/Init/Data/Nat/Linear.lean

tactic: match p with
| [] => rfl
| (k, v) :: p =>
  have ih := denote_fuse ctx p
  simp
  split
  case _ h => simp [← ih, h]
  case _ k' v' p' h => by_cases he : v == v' <;> simp [he, ← ih, h]; rw [eq_of_beq he]
state_before: ctx : Context
p : Poly
⊢ denote ctx (fuse p) = denote ctx p

tactic: rfl
state_before: ctx : Context
p : Poly
⊢ denote ctx (fuse []) = denote ctx []

tactic: have ih := denote_fuse ctx p
state_before: ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
⊢ denote ctx (fuse ((k, v) :: p)) = denote ctx ((k, v) :: p)

tactic: simp
state_before: ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
⊢ denote ctx (fuse ((k, v) :: p)) = denote ctx ((k, v) :: p)

tactic: split
state_before: ctx : Context
p✝ : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
⊢ denote ctx
      (match fuse p with
      | [] => [(k, v)]
      | (k', v') :: p' => bif v == v' then (k + k', v) :: p' else (k, v) :: (k', v') :: p') =
    denote ctx p + k * Var.denote ctx v

tactic: case _ h => simp [← ih, h]
state_before: case h_1
ctx : Context
p✝¹ : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
p✝ : Poly
heq✝ : fuse p = []
⊢ denote ctx [(k, v)] = denote ctx p + k * Var.denote ctx v

case h_2
ctx : Context
p✝² : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
p✝¹ : Poly
k✝ : Nat
v✝ : Var
p✝ : List (Nat × Var)
heq✝ : fuse p = (k✝, v✝) :: p✝
⊢ denote ctx (bif v == v✝ then (k + k✝, v) :: p✝ else (k, v) :: (k✝, v✝) :: p✝) = denote ctx p + k * Var.denote ctx v

tactic: case _ k' v' p' h => by_cases he : v == v' <;> simp [he, ← ih, h]; rw [eq_of_beq he]
state_before: case h_2
ctx : Context
p✝² : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
p✝¹ : Poly
k✝ : Nat
v✝ : Var
p✝ : List (Nat × Var)
heq✝ : fuse p = (k✝, v✝) :: p✝
⊢ denote ctx (bif v == v✝ then (k + k✝, v) :: p✝ else (k, v) :: (k✝, v✝) :: p✝) = denote ctx p + k * Var.denote ctx v

tactic: simp [← ih, h]
state_before: ctx : Context
p✝¹ : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
p✝ : Poly
h : fuse p = []
⊢ denote ctx [(k, v)] = denote ctx p + k * Var.denote ctx v

tactic: by_cases he : v == v' <;> simp [he, ← ih, h]
state_before: ctx : Context
p✝¹ : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
p✝ : Poly
k' : Nat
v' : Var
p' : List (Nat × Var)
h : fuse p = (k', v') :: p'
⊢ denote ctx (bif v == v' then (k + k', v) :: p' else (k, v) :: (k', v') :: p') = denote ctx p + k * Var.denote ctx v

tactic: rw [eq_of_beq he]
state_before: case inl
ctx : Context
p✝¹ : Poly
k : Nat
v : Var
p : List (Nat × Var)
ih : denote ctx (fuse p) = denote ctx p
p✝ : Poly
k' : Nat
v' : Var
p' : List (Nat × Var)
h : fuse p = (k', v') :: p'
he : (v == v') = true
⊢ denote ctx p' + (k * Var.denote ctx v + k' * Var.denote ctx v) =
    denote ctx p' + (k * Var.denote ctx v + k' * Var.denote ctx v')