tasksource/leandojo huggingface dataset:
Theorem: Matrix.toLin_mul_apply
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: rw [Matrix.toLin_mul v₁ v₂, LinearMap.comp_apply]
state_before: R : Type u_3
inst✝¹¹ : CommSemiring R
l : Type u_1
m : Type u_2
n : Type u_4
inst✝¹⁰ : Fintype n
inst✝⁹ : Fintype m
inst✝⁸ : DecidableEq n
M₁ : Type u_6
M₂ : Type u_7
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : Module R M₁
inst✝⁴ : Module R M₂
v₁ : Basis n R M₁
v₂ : Basis m R M₂
M₃ : Type u_5
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₃
v₃ : Basis l R M₃
inst✝¹ : Fintype l
inst✝ : DecidableEq m
A : Matrix l m R
B : Matrix m n R
x : M₁
⊢ ↑(↑(toLin v₁ v₃) (A ⬝ B)) x = ↑(↑(toLin v₂ v₃) A) (↑(↑(toLin v₁ v₂) B) x)
Theorem: Set.isPwo_insert
File: Mathlib/Order/WellFoundedSet.lean

tactic: simp only [← singleton_union, isPwo_union, isPwo_singleton, true_and_iff]
state_before: ι : Type ?u.106932
α : Type u_1
β : Type ?u.106938
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
a : α
⊢ IsPwo (insert a s) ↔ IsPwo s
Theorem: IsPreconnected.intermediate_value₂_eventually₁
File: Mathlib/Topology/Algebra/Order/IntermediateValue.lean

tactic: rw [continuousOn_iff_continuous_restrict] at hf hg
state_before: X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
s : Set X
hs : IsPreconnected s
a : X
l : Filter X
ha : a ∈ s
inst✝ : NeBot l
hl : l ≤ 𝓟 s
f g : X → α
hf : ContinuousOn f s
hg : ContinuousOn g s
ha' : f a ≤ g a
he : g ≤ᶠ[l] f
⊢ ∃ x, x ∈ s ∧ f x = g x

tactic: obtain ⟨b, h⟩ :=
  @intermediate_value_univ₂_eventually₁ _ _ _ _ _ _ (Subtype.preconnectedSpace hs) ⟨a, ha⟩ _
    (comap_coe_neBot_of_le_principal hl) _ _ hf hg ha' (he.comap _)
state_before: X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
s : Set X
hs : IsPreconnected s
a : X
l : Filter X
ha : a ∈ s
inst✝ : NeBot l
hl : l ≤ 𝓟 s
f g : X → α
hf : Continuous (restrict s f)
hg : Continuous (restrict s g)
ha' : f a ≤ g a
he : g ≤ᶠ[l] f
⊢ ∃ x, x ∈ s ∧ f x = g x

tactic: exact ⟨b, b.prop, h⟩
state_before: case intro
X : Type u
α : Type v
inst✝⁴ : TopologicalSpace X
inst✝³ : LinearOrder α
inst✝² : TopologicalSpace α
inst✝¹ : OrderClosedTopology α
s : Set X
hs : IsPreconnected s
a : X
l : Filter X
ha : a ∈ s
inst✝ : NeBot l
hl : l ≤ 𝓟 s
f g : X → α
hf : Continuous (restrict s f)
hg : Continuous (restrict s g)
ha' : f a ≤ g a
he : g ≤ᶠ[l] f
b : ↑s
h : restrict s f b = restrict s g b
⊢ ∃ x, x ∈ s ∧ f x = g x
Theorem: CategoryTheory.exact_comp_hom_inv_comp
File: Mathlib/Algebra/Homology/Exact.lean

tactic: refine' ⟨by simp [h.w], _⟩
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h✝ : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
i : B ≅ D
h : Exact f g
⊢ Exact (f ≫ i.hom) (i.inv ≫ g)

tactic: rw [imageToKernel_comp_hom_inv_comp]
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h✝ : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
i : B ≅ D
h : Exact f g
⊢ Epi (imageToKernel (f ≫ i.hom) (i.inv ≫ g) (_ : (f ≫ i.hom) ≫ i.inv ≫ g = 0))

tactic: haveI := h.epi
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h✝ : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
i : B ≅ D
h : Exact f g
⊢ Epi ((imageSubobjectCompIso f i.hom).hom ≫ imageToKernel f g (_ : f ≫ g = 0) ≫ (kernelSubobjectIsoComp i.inv g).inv)

tactic: infer_instance
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h✝ : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
i : B ≅ D
h : Exact f g
this : Epi (imageToKernel f g (_ : f ≫ g = 0))
⊢ Epi ((imageSubobjectCompIso f i.hom).hom ≫ imageToKernel f g (_ : f ≫ g = 0) ≫ (kernelSubobjectIsoComp i.inv g).inv)

tactic: simp [h.w]
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h✝ : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
i : B ≅ D
h : Exact f g
⊢ (f ≫ i.hom) ≫ i.inv ≫ g = 0
Theorem: List.modifyNth_eq_set_get?
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
f : α → α
l : List α
⊢ modifyNth f 0 l = Option.getD ((fun a => set l 0 (f a)) <$> get? l 0) l

tactic: cases l.get? n <;> rfl
state_before: α : Type u_1
f : α → α
n : Nat
b : α
l : List α
⊢ b :: Option.getD ((fun a => set l (Nat.add n 0) (f a)) <$> get? l (Nat.add n 0)) l =
    Option.getD ((fun a => set (b :: l) (n + 1) (f a)) <$> get? (b :: l) (n + 1)) (b :: l)
Theorem: measurable_liftCover
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: rw [preimage_liftCover]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93120
δ : Type ?u.93123
δ' : Type ?u.93126
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : Countable ι
t : ι → Set α
htm : ∀ (i : ι), MeasurableSet (t i)
f : (i : ι) → ↑(t i) → β
hfm : ∀ (i : ι), Measurable (f i)
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ t i) (hxj : x ∈ t j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
htU : (⋃ (i : ι), t i) = univ
s : Set β
hs : MeasurableSet s
⊢ MeasurableSet (liftCover t f hf htU ⁻¹' s)

tactic: exact .iUnion fun i => .subtype_image (htm i) <| hfm i hs
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93120
δ : Type ?u.93123
δ' : Type ?u.93126
ι : Sort uι
s✝ t✝ u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : Countable ι
t : ι → Set α
htm : ∀ (i : ι), MeasurableSet (t i)
f : (i : ι) → ↑(t i) → β
hfm : ∀ (i : ι), Measurable (f i)
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ t i) (hxj : x ∈ t j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
htU : (⋃ (i : ι), t i) = univ
s : Set β
hs : MeasurableSet s
⊢ MeasurableSet (⋃ (i : ι), Subtype.val '' (f i ⁻¹' s))
Theorem: WellFounded.rank_eq
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [rank, Acc.rank_eq]
state_before: α : Type u
r : α → α → Prop
a b : α
hwf : WellFounded r
⊢ rank hwf a = sup fun b => succ (rank hwf ↑b)

tactic: rfl
state_before: α : Type u
r : α → α → Prop
a b : α
hwf : WellFounded r
⊢ (sup fun b => succ (Acc.rank (_ : Acc r ↑b))) = sup fun b => succ (rank hwf ↑b)
Theorem: PiNat.completeSpace
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: refine' Metric.complete_of_convergent_controlled_sequences (fun n => (1 / 2) ^ n) (by simp) _
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
⊢ CompleteSpace ((n : ℕ) → E n)

tactic: intro u hu
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
⊢ ∀ (u : ℕ → (n : ℕ) → E n),
    (∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N) → ∃ x, Tendsto u atTop (𝓝 x)

tactic: refine' ⟨fun n => u n n, tendsto_pi_nhds.2 fun i => _⟩
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
⊢ ∃ x, Tendsto u atTop (𝓝 x)

tactic: refine' tendsto_const_nhds.congr' _
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i : ℕ
⊢ Tendsto (fun i_1 => u i_1 i) atTop (𝓝 (u i i))

tactic: filter_upwards [Filter.Ici_mem_atTop i]with n hn
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i : ℕ
⊢ (fun x => u i i) =ᶠ[atTop] fun i_1 => u i_1 i

tactic: exact apply_eq_of_dist_lt (hu i i n le_rfl hn) le_rfl
state_before: case h
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i n : ℕ
hn : n ∈ Ici i
⊢ u i i = u n i

tactic: simp
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
⊢ ∀ (n : ℕ), 0 < (fun n => (1 / 2) ^ n) n
Theorem: FinVec.exists_iff
File: Mathlib/Data/Fin/Tuple/Reflection.lean

tactic: simp only [Exists, Fin.exists_fin_zero_pi, Matrix.vecEmpty]
state_before: m n : ℕ
α : Type u_1
β : Type ?u.7741
γ : Type ?u.7744
P : (Fin 0 → α) → Prop
⊢ Exists P ↔ ∃ x, P x

tactic: rfl
state_before: m n : ℕ
α : Type u_1
β : Type ?u.7741
γ : Type ?u.7744
P : (Fin 0 → α) → Prop
⊢ P Fin.elim0' ↔ P finZeroElim

tactic: simp only [Exists, exists_iff, Fin.exists_fin_succ_pi, Matrix.vecCons]
state_before: m n✝ : ℕ
α : Type u_1
β : Type ?u.7741
γ : Type ?u.7744
n : ℕ
P : (Fin (Nat.succ n) → α) → Prop
⊢ Exists P ↔ ∃ x, P x
Theorem: PFun.prodLift_fst_comp_snd_comp
File: Mathlib/Data/PFun.lean

tactic: simp
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
δ : Type u_4
ε : Type ?u.65395
ι : Type ?u.65398
f✝ : α →. β
f : α →. γ
g : β →. δ
a : α × β
⊢ ∀ (b : γ × δ), b ∈ prodLift (comp f ↑Prod.fst) (comp g ↑Prod.snd) a ↔ b ∈ prodMap f g a
Theorem: Ideal.comap_sInf'
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [iInf_image]
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : Semiring R
inst✝ : Semiring S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
G : Type ?u.791790
rcg : RingHomClass G S R
ι : Sort ?u.791824
s : Set (Ideal S)
⊢ (⨅ (I : Ideal S) (_ : I ∈ s), comap f I) = ⨅ (I : Ideal R) (_ : I ∈ comap f '' s), I
Theorem: eq_natCast'
File: Mathlib/Data/Nat/Cast/Basic.lean

tactic: simp [map_zero f]
state_before: α : Type ?u.36144
β : Type ?u.36147
A : Type u_2
B : Type ?u.36153
F : Type u_1
inst✝² : AddMonoidWithOne B
inst✝¹ : AddMonoidWithOne A
inst✝ : AddMonoidHomClass F ℕ A
f : F
h1 : ↑f 1 = 1
⊢ ↑f 0 = ↑0

tactic: rw [map_add, h1, eq_natCast' f h1 n, Nat.cast_add_one]
state_before: α : Type ?u.36144
β : Type ?u.36147
A : Type u_2
B : Type ?u.36153
F : Type u_1
inst✝² : AddMonoidWithOne B
inst✝¹ : AddMonoidWithOne A
inst✝ : AddMonoidHomClass F ℕ A
f : F
h1 : ↑f 1 = 1
n : ℕ
⊢ ↑f (n + 1) = ↑(n + 1)
Theorem: CategoryTheory.GrothendieckTopology.pullback_close
File: Mathlib/CategoryTheory/Sites/Closed.lean

tactic: apply le_antisymm
state_before: C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
⊢ close J₁ (Sieve.pullback f S) = Sieve.pullback f (close J₁ S)

tactic: refine' J₁.le_close_of_isClosed (Sieve.pullback_monotone _ (J₁.le_close S)) _
state_before: case a
C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
⊢ close J₁ (Sieve.pullback f S) ≤ Sieve.pullback f (close J₁ S)

tactic: apply J₁.isClosed_pullback _ _ (J₁.close_isClosed _)
state_before: case a
C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
⊢ IsClosed J₁ (Sieve.pullback f (close J₁ S))

tactic: intro Z g hg
state_before: case a
C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
⊢ Sieve.pullback f (close J₁ S) ≤ close J₁ (Sieve.pullback f S)

tactic: change _ ∈ J₁ _
state_before: case a
C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
Z : C
g : Z ⟶ Y
hg : (Sieve.pullback f (close J₁ S)).arrows g
⊢ (close J₁ (Sieve.pullback f S)).arrows g

tactic: rw [← Sieve.pullback_comp]
state_before: case a
C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
Z : C
g : Z ⟶ Y
hg : (Sieve.pullback f (close J₁ S)).arrows g
⊢ Sieve.pullback g (Sieve.pullback f S) ∈ sieves J₁ Z

tactic: apply hg
state_before: case a
C : Type u
inst✝ : Category C
J₁ J₂ : GrothendieckTopology C
X Y : C
f : Y ⟶ X
S : Sieve X
Z : C
g : Z ⟶ Y
hg : (Sieve.pullback f (close J₁ S)).arrows g
⊢ Sieve.pullback (g ≫ f) S ∈ sieves J₁ Z
Theorem: Multiset.erase_lt
File: Mathlib/Data/Multiset/Basic.lean

tactic: simpa [h] using lt_cons_self (s.erase a) a
state_before: α : Type u_1
β : Type ?u.99576
γ : Type ?u.99579
inst✝ : DecidableEq α
s✝ t : Multiset α
a✝ b a : α
s : Multiset α
h : a ∈ s
⊢ erase s a < s
Theorem: Units.map_id
File: Mathlib/Algebra/Hom/Units.lean

tactic: ext
state_before: α : Type ?u.8737
M : Type u
N : Type v
P : Type w
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
⊢ map (MonoidHom.id M) = MonoidHom.id Mˣ

tactic: rfl
state_before: case h.a
α : Type ?u.8737
M : Type u
N : Type v
P : Type w
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
x✝ : Mˣ
⊢ ↑(↑(map (MonoidHom.id M)) x✝) = ↑(↑(MonoidHom.id Mˣ) x✝)
Theorem: MeasureTheory.ExistsSeqTendstoAe.seqTendstoAeSeq_strictMono
File: Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean

tactic: refine' strictMono_nat_of_lt_succ fun n => _
state_before: α : Type u_1
ι : Type ?u.19419
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
⊢ StrictMono (seqTendstoAeSeq hfg)

tactic: rw [seqTendstoAeSeq_succ]
state_before: α : Type u_1
ι : Type ?u.19419
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
n : ℕ
⊢ seqTendstoAeSeq hfg n < seqTendstoAeSeq hfg (n + 1)

tactic: exact lt_of_lt_of_le (lt_add_one <| seqTendstoAeSeq hfg n) (le_max_right _ _)
state_before: α : Type u_1
ι : Type ?u.19419
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
n : ℕ
⊢ seqTendstoAeSeq hfg n < max (seqTendstoAeSeqAux hfg (n + 1)) (seqTendstoAeSeq hfg n + 1)
Theorem: lipschitzWith_sup_right
File: Mathlib/Analysis/Normed/Order/Lattice.lean

tactic: rw [NNReal.coe_one, one_mul, dist_eq_norm, dist_eq_norm]
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
z x y : α
⊢ dist (x ⊔ z) (y ⊔ z) ≤ ↑1 * dist x y

tactic: exact norm_sup_sub_sup_le_norm x y z
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
z x y : α
⊢ ‖x ⊔ z - y ⊔ z‖ ≤ ‖x - y‖
Theorem: Finset.not_mem_empty
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [mem_def, empty_val, not_mem_zero, not_false_iff]
state_before: α : Type u_1
β : Type ?u.18918
γ : Type ?u.18921
s : Finset α
a : α
⊢ ¬a ∈ ∅
Theorem: Std.BinomialHeapImp.HeapNode.WellFormed.realSize_eq
File: Std/Data/BinomialHeap.lean

tactic: rw [realSize, realSize_eq c, Nat.pow_succ, Nat.mul_succ]
state_before: α : Type u_1
le : α → α → Bool
a a✝² : α
a✝¹ a✝ : HeapNode α
w✝ : Nat
left✝ : ∀ [inst : TotalBLE le], le a a✝² = true
c : WellFormed le a✝² a✝¹ w✝
s : WellFormed le a a✝ w✝
⊢ realSize (node a✝² a✝¹ a✝) + 1 = 2 ^ (w✝ + 1)

tactic: simp [Nat.add_assoc, realSize_eq s]
state_before: α : Type u_1
le : α → α → Bool
a a✝² : α
a✝¹ a✝ : HeapNode α
w✝ : Nat
left✝ : ∀ [inst : TotalBLE le], le a a✝² = true
c : WellFormed le a✝² a✝¹ w✝
s : WellFormed le a a✝ w✝
⊢ 2 ^ w✝ + realSize a✝ + 1 = 2 ^ w✝ * 1 + 2 ^ w✝
Theorem: List.takeWhile_eq_self_iff
File: Mathlib/Data/List/Basic.lean

tactic: induction' l with x xs IH
state_before: ι : Type ?u.399470
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
l : List α
⊢ takeWhile p l = l ↔ ∀ (x : α), x ∈ l → p x = true

tactic: simp [takeWhile]
state_before: case nil
ι : Type ?u.399470
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
l : List α
⊢ takeWhile p [] = [] ↔ ∀ (x : α), x ∈ [] → p x = true

tactic: by_cases hp : p x <;> simp [hp, takeWhile, IH]
state_before: case cons
ι : Type ?u.399470
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
l : List α
x : α
xs : List α
IH : takeWhile p xs = xs ↔ ∀ (x : α), x ∈ xs → p x = true
⊢ takeWhile p (x :: xs) = x :: xs ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true
Theorem: JoinedIn.symm
File: Mathlib/Topology/PathConnected.lean

tactic: cases' h.mem with hx hy
state_before: X : Type u_1
Y : Type ?u.621994
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622009
F : Set X
h : JoinedIn F x y
⊢ JoinedIn F y x

tactic: simp_all [joinedIn_iff_joined]
state_before: case intro
X : Type u_1
Y : Type ?u.621994
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622009
F : Set X
h : JoinedIn F x y
hx : x ∈ F
hy : y ∈ F
⊢ JoinedIn F y x

tactic: exact h.symm
state_before: case intro
X : Type u_1
Y : Type ?u.621994
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622009
F : Set X
hx✝ : x ∈ F
hy✝ : y ∈ F
h : Joined { val := x, property := (_ : x ∈ F) } { val := y, property := (_ : y ∈ F) }
hx : x ∈ F
hy : y ∈ F
⊢ Joined { val := y, property := (_ : y ∈ F) } { val := x, property := (_ : x ∈ F) }
Theorem: BoxIntegral.Prepartition.biUnion_top
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: ext
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
⊢ (biUnion π fun x => ⊤) = π

tactic: simp
state_before: case h
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
J✝ : Box ι
⊢ (J✝ ∈ biUnion π fun x => ⊤) ↔ J✝ ∈ π
Theorem: Real.tan_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: simp [tan_eq_sin_div_cos]
state_before: ⊢ tan (π / 2) = 0
Theorem: bernsteinPolynomial.derivative_zero
File: Mathlib/RingTheory/Polynomial/Bernstein.lean

tactic: simp [bernsteinPolynomial, Polynomial.derivative_pow]
state_before: R : Type u_1
inst✝ : CommRing R
n : ℕ
⊢ ↑Polynomial.derivative (bernsteinPolynomial R n 0) = -↑n * bernsteinPolynomial R (n - 1) 0
Theorem: Nat.Linear.ExprCnstr.eq_of_toNormPoly_eq
File: src/lean/Init/Data/Nat/Linear.lean

tactic: have h := congrArg (PolyCnstr.denote ctx) (eq_of_beq h)
state_before: ctx : Context
c d : ExprCnstr
h : (toNormPoly c == toPoly d) = true
⊢ denote ctx c = denote ctx d

tactic: simp at h
state_before: ctx : Context
c d : ExprCnstr
h✝ : (toNormPoly c == toPoly d) = true
h : PolyCnstr.denote ctx (toNormPoly c) = PolyCnstr.denote ctx (toPoly d)
⊢ denote ctx c = denote ctx d

tactic: assumption
state_before: ctx : Context
c d : ExprCnstr
h✝ : (toNormPoly c == toPoly d) = true
h : denote ctx c = denote ctx d
⊢ denote ctx c = denote ctx d
Theorem: Inducing.dense_iff
File: Mathlib/Topology/Maps.lean

tactic: simp only [Dense, hf.closure_eq_preimage_closure_image, mem_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.6389
δ : Type ?u.6392
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
hf : Inducing f
s : Set α
⊢ Dense s ↔ ∀ (x : α), f x ∈ closure (f '' s)
Theorem: Real.Angle.sign_neg_coe_nonpos_of_nonneg_of_le_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [sign, sign_nonpos_iff, sin_neg, Left.neg_nonpos_iff]
state_before: θ : ℝ
h0 : 0 ≤ θ
hpi : θ ≤ π
⊢ sign (-↑θ) ≤ 0

tactic: exact sin_nonneg_of_nonneg_of_le_pi h0 hpi
state_before: θ : ℝ
h0 : 0 ≤ θ
hpi : θ ≤ π
⊢ 0 ≤ sin ↑θ
Theorem: Matrix.IsAdjMatrix.apply_ne_zero_iff
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: rw [← apply_ne_one_iff h, Classical.not_not]
state_before: V : Type u_2
α : Type u_1
β : Type ?u.6455
A : Matrix V V α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
h : IsAdjMatrix A
i j : V
⊢ ¬A i j = 0 ↔ A i j = 1
Theorem: Part.bind_of_mem
File: Mathlib/Data/Part.lean

tactic: rw [eq_some_iff.2 h, bind_some]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.22679
o : Part α
a : α
h : a ∈ o
f : α → Part β
⊢ Part.bind o f = f a
Theorem: Set.wellFoundedOn_iff_no_descending_seq
File: Mathlib/Order/WellFoundedSet.lean

tactic: simp only [wellFoundedOn_iff, RelEmbedding.wellFounded_iff_no_descending_seq, ← not_exists, ←
  not_nonempty_iff, not_iff_not]
state_before: ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
⊢ WellFoundedOn s r ↔ ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s

tactic: constructor
state_before: ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
⊢ Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s) ↔ ∃ x, ∀ (n : ℕ), ↑x n ∈ s

tactic: rintro ⟨⟨f, hf⟩⟩
state_before: case mp
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
⊢ Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s) → ∃ x, ∀ (n : ℕ), ↑x n ∈ s

tactic: have H : ∀ n, f n ∈ s := fun n => (hf.2 n.lt_succ_self).2.2
state_before: case mp.intro.mk
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
f : ℕ ↪ α
hf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b
⊢ ∃ x, ∀ (n : ℕ), ↑x n ∈ s

tactic: refine' ⟨⟨f, _⟩, H⟩
state_before: case mp.intro.mk
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
f : ℕ ↪ α
hf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b
H : ∀ (n : ℕ), ↑f n ∈ s
⊢ ∃ x, ∀ (n : ℕ), ↑x n ∈ s

tactic: simpa only [H, and_true_iff] using @hf
state_before: case mp.intro.mk
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
f : ℕ ↪ α
hf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b
H : ∀ (n : ℕ), ↑f n ∈ s
⊢ ∀ {a b : ℕ}, r (↑f a) (↑f b) ↔ a > b

tactic: rintro ⟨⟨f, hf⟩, hfs : ∀ n, f n ∈ s⟩
state_before: case mpr
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
⊢ (∃ x, ∀ (n : ℕ), ↑x n ∈ s) → Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s)

tactic: refine' ⟨⟨f, _⟩⟩
state_before: case mpr.intro.mk
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
f : ℕ ↪ α
hf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ↔ a > b
hfs : ∀ (n : ℕ), ↑f n ∈ s
⊢ Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s)

tactic: simpa only [hfs, and_true_iff] using @hf
state_before: case mpr.intro.mk
ι : Type ?u.6720
α : Type u_1
β : Type ?u.6726
r r' : α → α → Prop
inst✝ : IsStrictOrder α r
s t : Set α
f : ℕ ↪ α
hf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ↔ a > b
hfs : ∀ (n : ℕ), ↑f n ∈ s
⊢ ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b
Theorem: ZMod.neg_val
File: Mathlib/Data/ZMod/Basic.lean

tactic: rw [neg_val']
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
⊢ val (-a) = if a = 0 then 0 else n - val a

tactic: by_cases h : a = 0
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
⊢ (n - val a) % n = if a = 0 then 0 else n - val a

tactic: rw [if_neg h]
state_before: case neg
n : ℕ
inst✝ : NeZero n
a : ZMod n
h : ¬a = 0
⊢ (n - val a) % n = if a = 0 then 0 else n - val a

tactic: apply Nat.mod_eq_of_lt
state_before: case neg
n : ℕ
inst✝ : NeZero n
a : ZMod n
h : ¬a = 0
⊢ (n - val a) % n = n - val a

tactic: apply Nat.sub_lt (NeZero.pos n)
state_before: case neg.h
n : ℕ
inst✝ : NeZero n
a : ZMod n
h : ¬a = 0
⊢ n - val a < n

tactic: contrapose! h
state_before: case neg.h
n : ℕ
inst✝ : NeZero n
a : ZMod n
h : ¬a = 0
⊢ 0 < val a

tactic: rwa [le_zero_iff, val_eq_zero] at h
state_before: case neg.h
n : ℕ
inst✝ : NeZero n
a : ZMod n
h : val a ≤ 0
⊢ a = 0

tactic: rw [if_pos h, h, val_zero, tsub_zero, Nat.mod_self]
state_before: case pos
n : ℕ
inst✝ : NeZero n
a : ZMod n
h : a = 0
⊢ (n - val a) % n = if a = 0 then 0 else n - val a
Theorem: CategoryTheory.IsPushout.IsVanKampen.isPullback_of_mono_left
File: Mathlib/CategoryTheory/Adhesive.lean

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : IsVanKampen H
⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : IsVanKampen H
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : IsVanKampen H
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y