[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
[PROOFSTEP]
rcases s.eq_empty_or_nonempty with (rfl | hs)
[GOAL]
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : Set.Nonempty s
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
[PROOFSTEP]
rcases t.eq_empty_or_nonempty with (rfl | ht)
[GOAL]
case inr.inl
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
S : (i : ι) → Set (π i)
hs : Set.Nonempty s
⊢ IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅
[PROOFSTEP]
simp
[GOAL]
case inr.inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : Set.Nonempty s
ht : Set.Nonempty t
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
[PROOFSTEP]
simp only [hs.ne_empty, ht.ne_empty, isBounded_prod_of_nonempty (hs.prod ht), false_or_iff]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (s ×ˢ s) ↔ IsBounded s
[PROOFSTEP]
rcases s.eq_empty_or_nonempty with (rfl | hs)
[GOAL]
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (∅ ×ˢ ∅) ↔ IsBounded ∅
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : Set.Nonempty s
⊢ IsBounded (s ×ˢ s) ↔ IsBounded s
[PROOFSTEP]
exact (isBounded_prod_of_nonempty (hs.prod hs)).trans (and_self_iff _)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (Set.pi univ S) ↔ (∃ i, S i = ∅) ∨ ∀ (i : ι), IsBounded (S i)
[PROOFSTEP]
by_cases hne : ∃ i, S i = ∅
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hne : ∃ i, S i = ∅
⊢ IsBounded (Set.pi univ S) ↔ (∃ i, S i = ∅) ∨ ∀ (i : ι), IsBounded (S i)
[PROOFSTEP]
simp [hne, univ_pi_eq_empty_iff.2 hne]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hne : ¬∃ i, S i = ∅
⊢ IsBounded (Set.pi univ S) ↔ (∃ i, S i = ∅) ∨ ∀ (i : ι), IsBounded (S i)
[PROOFSTEP]
simp only [hne, false_or_iff]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hne : ¬∃ i, S i = ∅
⊢ IsBounded (Set.pi univ S) ↔ ∀ (i : ι), IsBounded (S i)
[PROOFSTEP]
simp only [not_exists, ← Ne.def, ← nonempty_iff_ne_empty, ← univ_pi_nonempty_iff] at hne
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hne : Set.Nonempty (Set.pi univ fun i => S i)
⊢ IsBounded (Set.pi univ S) ↔ ∀ (i : ι), IsBounded (S i)
[PROOFSTEP]
exact isBounded_pi_of_nonempty hne
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝⁵ : Fintype ι
inst✝⁴ : Bornology α
inst✝³ : Bornology β
inst✝² : (i : ι) → Bornology (π i)
inst✝¹ : BoundedSpace α
inst✝ : BoundedSpace β
⊢ BoundedSpace (α × β)
[PROOFSTEP]
simp [← cobounded_eq_bot_iff, cobounded_prod]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝⁴ : Fintype ι
inst✝³ : Bornology α
inst✝² : Bornology β
inst✝¹ : (i : ι) → Bornology (π i)
inst✝ : ∀ (i : ι), BoundedSpace (π i)
⊢ BoundedSpace ((i : ι) → π i)
[PROOFSTEP]
simp [← cobounded_eq_bot_iff, cobounded_pi]
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝⁴ : Fintype ι
inst✝³ : Bornology α✝
inst✝² : Bornology β✝
inst✝¹ : (i : ι) → Bornology (π i)
α : Type u_5
β : Type u_6
inst✝ : Bornology β
f : α → β
⊢ BoundedSpace α ↔ IsBounded (range f)
[PROOFSTEP]
rw [← @isBounded_univ _ (Bornology.induced f), isBounded_induced, image_univ]
  -- porting note: had to explicitly provided the bornology to `isBounded_univ`.
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝³ : Fintype ι
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
p : α → Prop
⊢ BoundedSpace (Subtype p) ↔ IsBounded {x | p x}
[PROOFSTEP]
rw [boundedSpace_induced_iff, Subtype.range_coe_subtype]


[GOAL]
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
x✝¹ : ℝ
x✝ : E
⊢ (fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) x✝¹ (-x✝) =
    (fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) x✝¹ x✝
[PROOFSTEP]
simp only [norm_neg]
[GOAL]
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
⊢ ContDiffOn ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (Set.Ioi 1 ×ˢ Set.univ)
[PROOFSTEP]
rintro ⟨R, x⟩ ⟨hR : 1 < R, -⟩
[GOAL]
case mk.intro
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
x : E
hR : 1 < R
⊢ ContDiffWithinAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (Set.Ioi 1 ×ˢ Set.univ) (R, x)
[PROOFSTEP]
apply ContDiffAt.contDiffWithinAt
[GOAL]
case mk.intro.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
x : E
hR : 1 < R
⊢ ContDiffAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (R, x)
[PROOFSTEP]
rw [← sub_pos] at hR
[GOAL]
case mk.intro.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
x : E
hR✝ : 1 < R
hR : 0 < R - 1
⊢ ContDiffAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (R, x)
[PROOFSTEP]
rcases eq_or_ne x 0 with rfl | hx
[GOAL]
case mk.intro.h.inl
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR✝ : 1 < R
hR : 0 < R - 1
⊢ ContDiffAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (R, 0)
[PROOFSTEP]
have A : ContinuousAt (fun p : ℝ × E ↦ (p.1 - ‖p.2‖) / (p.1 - 1)) (R, 0) :=
  (continuousAt_fst.sub continuousAt_snd.norm).div (continuousAt_fst.sub continuousAt_const) hR.ne'
[GOAL]
case mk.intro.h.inl
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR✝ : 1 < R
hR : 0 < R - 1
A : ContinuousAt (fun p => (p.fst - ‖p.snd‖) / (p.fst - 1)) (R, 0)
⊢ ContDiffAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (R, 0)
[PROOFSTEP]
have B : ∀ᶠ p in 𝓝 (R, (0 : E)), 1 ≤ (p.1 - ‖p.2‖) / (p.1 - 1) :=
  A.eventually <| le_mem_nhds <| (one_lt_div hR).2 <| sub_lt_sub_left (by simp) _
[GOAL]
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR✝ : 1 < R
hR : 0 < R - 1
A : ContinuousAt (fun p => (p.fst - ‖p.snd‖) / (p.fst - 1)) (R, 0)
⊢ ‖(R, 0).snd‖ < 1
[PROOFSTEP]
simp
[GOAL]
case mk.intro.h.inl
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR✝ : 1 < R
hR : 0 < R - 1
A : ContinuousAt (fun p => (p.fst - ‖p.snd‖) / (p.fst - 1)) (R, 0)
B : ∀ᶠ (p : ℝ × E) in 𝓝 (R, 0), 1 ≤ (p.fst - ‖p.snd‖) / (p.fst - 1)
⊢ ContDiffAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (R, 0)
[PROOFSTEP]
refine (contDiffAt_const (c := 1)).congr_of_eventuallyEq <| B.mono fun _ ↦ smoothTransition.one_of_one_le
[GOAL]
case mk.intro.h.inr
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
x : E
hR✝ : 1 < R
hR : 0 < R - 1
hx : x ≠ 0
⊢ ContDiffAt ℝ ⊤ (uncurry fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) (R, x)
[PROOFSTEP]
refine smoothTransition.contDiffAt.comp _ (ContDiffAt.div ?_ ?_ hR.ne')
[GOAL]
case mk.intro.h.inr.refine_1
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
x : E
hR✝ : 1 < R
hR : 0 < R - 1
hx : x ≠ 0
⊢ ContDiffAt ℝ ⊤ (fun a => a.fst - ‖a.snd‖) (R, x)
[PROOFSTEP]
exact contDiffAt_fst.sub (contDiffAt_snd.norm ℝ hx)
[GOAL]
case mk.intro.h.inr.refine_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
x : E
hR✝ : 1 < R
hR : 0 < R - 1
hx : x ≠ 0
⊢ ContDiffAt ℝ ⊤ (fun a => a.fst - 1) (R, x)
[PROOFSTEP]
exact contDiffAt_fst.sub contDiffAt_const
[GOAL]
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR : 1 < R
⊢ Function.support ((fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) R) = Metric.ball 0 R
[PROOFSTEP]
ext x
[GOAL]
case h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR : 1 < R
x : E
⊢ x ∈ Function.support ((fun R x => smoothTransition ((R - ‖x‖) / (R - 1))) R) ↔ x ∈ Metric.ball 0 R
[PROOFSTEP]
rw [mem_support, Ne.def, smoothTransition.zero_iff_nonpos, not_le, mem_ball_zero_iff]
[GOAL]
case h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
R : ℝ
hR : 1 < R
x : E
⊢ 0 < (R - ‖x‖) / (R - 1) ↔ ‖x‖ < R
[PROOFSTEP]
simp [div_pos_iff, sq_lt_sq, abs_of_pos (one_pos.trans hR), hR, hR.not_lt]


[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalAddGroup E
ι : Type u_3
b : ι → Set E
p : ι → Prop
hbasis : HasBasis (𝓝 0) p b
hconvex : ∀ (i : ι), p i → Convex 𝕜 (b i)
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
refine'
  LocallyConvexSpace.ofBases 𝕜 E (fun (x : E) (i : ι) => (· + ·) x '' b i) (fun _ => p) (fun x => _) fun x i hi =>
    (hconvex i hi).translate x
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalAddGroup E
ι : Type u_3
b : ι → Set E
p : ι → Prop
hbasis : HasBasis (𝓝 0) p b
hconvex : ∀ (i : ι), p i → Convex 𝕜 (b i)
x : E
⊢ HasBasis (𝓝 x) ((fun x => p) x) ((fun x i => (fun x x_1 => x + x_1) x '' b i) x)
[PROOFSTEP]
rw [← map_add_left_nhds_zero]
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalAddGroup E
ι : Type u_3
b : ι → Set E
p : ι → Prop
hbasis : HasBasis (𝓝 0) p b
hconvex : ∀ (i : ι), p i → Convex 𝕜 (b i)
x : E
⊢ HasBasis (map ((fun x x_1 => x + x_1) x) (𝓝 0)) ((fun x => p) x) ((fun x i => (fun x x_1 => x + x_1) x '' b i) x)
[PROOFSTEP]
exact hbasis.map _
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v
[PROOFSTEP]
letI : UniformSpace E := TopologicalAddGroup.toUniformSpace E
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this : UniformSpace E := TopologicalAddGroup.toUniformSpace E
⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v
[PROOFSTEP]
haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this : UniformAddGroup E
⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v
[PROOFSTEP]
have := (LocallyConvexSpace.convex_open_basis_zero 𝕜 E).comap fun x : E × E => x.2 - x.1
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝¹ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this✝ : UniformAddGroup E
this :
  HasBasis (comap (fun x => x.snd - x.fst) (𝓝 0)) (fun s => 0 ∈ s ∧ IsOpen s ∧ Convex 𝕜 s) fun i =>
    (fun x => x.snd - x.fst) ⁻¹' id i
⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v
[PROOFSTEP]
rw [← uniformity_eq_comap_nhds_zero] at this
[GOAL]
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝¹ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this✝ : UniformAddGroup E
this : HasBasis (uniformity E) (fun s => 0 ∈ s ∧ IsOpen s ∧ Convex 𝕜 s) fun i => (fun x => x.snd - x.fst) ⁻¹' id i
⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v
[PROOFSTEP]
rcases disj.exists_uniform_thickening_of_basis this hs₂ ht₂ with ⟨V, ⟨hV0, hVopen, hVconvex⟩, hV⟩
[GOAL]
case intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝¹ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this✝ : UniformAddGroup E
this : HasBasis (uniformity E) (fun s => 0 ∈ s ∧ IsOpen s ∧ Convex 𝕜 s) fun i => (fun x => x.snd - x.fst) ⁻¹' id i
V : Set E
hV :
  Disjoint (⋃ (x : E) (_ : x ∈ s), UniformSpace.ball x ((fun x => x.snd - x.fst) ⁻¹' id V))
    (⋃ (x : E) (_ : x ∈ t), UniformSpace.ball x ((fun x => x.snd - x.fst) ⁻¹' id V))
hV0 : 0 ∈ V
hVopen : IsOpen V
hVconvex : Convex 𝕜 V
⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v
[PROOFSTEP]
refine'
  ⟨s + V, t + V, hVopen.add_left, hVopen.add_left, hs₁.add hVconvex, ht₁.add hVconvex, subset_add_left _ hV0,
    subset_add_left _ hV0, _⟩
[GOAL]
case intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝¹ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this✝ : UniformAddGroup E
this : HasBasis (uniformity E) (fun s => 0 ∈ s ∧ IsOpen s ∧ Convex 𝕜 s) fun i => (fun x => x.snd - x.fst) ⁻¹' id i
V : Set E
hV :
  Disjoint (⋃ (x : E) (_ : x ∈ s), UniformSpace.ball x ((fun x => x.snd - x.fst) ⁻¹' id V))
    (⋃ (x : E) (_ : x ∈ t), UniformSpace.ball x ((fun x => x.snd - x.fst) ⁻¹' id V))
hV0 : 0 ∈ V
hVopen : IsOpen V
hVconvex : Convex 𝕜 V
⊢ Disjoint (s + V) (t + V)
[PROOFSTEP]
simp_rw [← iUnion_add_left_image, image_add_left]
[GOAL]
case intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝¹ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this✝ : UniformAddGroup E
this : HasBasis (uniformity E) (fun s => 0 ∈ s ∧ IsOpen s ∧ Convex 𝕜 s) fun i => (fun x => x.snd - x.fst) ⁻¹' id i
V : Set E
hV :
  Disjoint (⋃ (x : E) (_ : x ∈ s), UniformSpace.ball x ((fun x => x.snd - x.fst) ⁻¹' id V))
    (⋃ (x : E) (_ : x ∈ t), UniformSpace.ball x ((fun x => x.snd - x.fst) ⁻¹' id V))
hV0 : 0 ∈ V
hVopen : IsOpen V
hVconvex : Convex 𝕜 V
⊢ Disjoint (⋃ (a : E) (_ : a ∈ s), (fun x => -a + x) ⁻¹' V) (⋃ (a : E) (_ : a ∈ t), (fun x => -a + x) ⁻¹' V)
[PROOFSTEP]
simp_rw [UniformSpace.ball, ← preimage_comp, sub_eq_neg_add] at hV
[GOAL]
case intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousConstSMul 𝕜 E
inst✝ : LocallyConvexSpace 𝕜 E
s t : Set E
disj : Disjoint s t
hs₁ : Convex 𝕜 s
hs₂ : IsCompact s
ht₁ : Convex 𝕜 t
ht₂ : IsClosed t
this✝¹ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
this✝ : UniformAddGroup E
this : HasBasis (uniformity E) (fun s => 0 ∈ s ∧ IsOpen s ∧ Convex 𝕜 s) fun i => (fun x => x.snd - x.fst) ⁻¹' id i
V : Set E
hV0 : 0 ∈ V
hVopen : IsOpen V
hVconvex : Convex 𝕜 V
hV :
  Disjoint (⋃ (x : E) (_ : x ∈ s), (fun x => -x.fst + x.snd) ∘ Prod.mk x ⁻¹' id V)
    (⋃ (x : E) (_ : x ∈ t), (fun x => -x.fst + x.snd) ∘ Prod.mk x ⁻¹' id V)
⊢ Disjoint (⋃ (a : E) (_ : a ∈ s), (fun x => -a + x) ⁻¹' V) (⋃ (a : E) (_ : a ∈ t), (fun x => -a + x) ⁻¹' V)
[PROOFSTEP]
exact hV
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
ts : Set (TopologicalSpace E)
h : ∀ (t : TopologicalSpace E), t ∈ ts → LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
letI : TopologicalSpace E := sInf ts
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
ts : Set (TopologicalSpace E)
h : ∀ (t : TopologicalSpace E), t ∈ ts → LocallyConvexSpace 𝕜 E
this : TopologicalSpace E := sInf ts
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
refine'
  LocallyConvexSpace.ofBases 𝕜 E (fun _ => fun If : Set ts × (ts → Set E) => ⋂ i ∈ If.1, If.2 i)
    (fun x => fun If : Set ts × (ts → Set E) => If.1.Finite ∧ ∀ i ∈ If.1, If.2 i ∈ @nhds _ (↑i) x ∧ Convex 𝕜 (If.2 i))
    (fun x => _) fun x If hif => convex_iInter fun i => convex_iInter fun hi => (hif.2 i hi).2
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
ts : Set (TopologicalSpace E)
h : ∀ (t : TopologicalSpace E), t ∈ ts → LocallyConvexSpace 𝕜 E
this : TopologicalSpace E := sInf ts
x : E
⊢ HasBasis (𝓝 x)
    ((fun x If => Set.Finite If.fst ∧ ∀ (i : ↑ts), i ∈ If.fst → Prod.snd If i ∈ 𝓝 x ∧ Convex 𝕜 (Prod.snd If i)) x)
    ((fun x If => ⋂ (i : ↑ts) (_ : i ∈ If.fst), Prod.snd If i) x)
[PROOFSTEP]
rw [nhds_sInf, ← iInf_subtype'']
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
ts : Set (TopologicalSpace E)
h : ∀ (t : TopologicalSpace E), t ∈ ts → LocallyConvexSpace 𝕜 E
this : TopologicalSpace E := sInf ts
x : E
⊢ HasBasis (⨅ (i : ↑ts), 𝓝 x)
    ((fun x If => Set.Finite If.fst ∧ ∀ (i : ↑ts), i ∈ If.fst → Prod.snd If i ∈ 𝓝 x ∧ Convex 𝕜 (Prod.snd If i)) x)
    ((fun x If => ⋂ (i : ↑ts) (_ : i ∈ If.fst), Prod.snd If i) x)
[PROOFSTEP]
exact hasBasis_iInf' fun i : ts => (@locallyConvexSpace_iff 𝕜 E _ _ _ ↑i).mp (h (↑i) i.2) x
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
ts' : ι → TopologicalSpace E
h' : ∀ (i : ι), LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
refine' locallyConvexSpace_sInf _
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
ts' : ι → TopologicalSpace E
h' : ∀ (i : ι), LocallyConvexSpace 𝕜 E
⊢ ∀ (t : TopologicalSpace E), (t ∈ range fun i => ts' i) → LocallyConvexSpace 𝕜 E
[PROOFSTEP]
rwa [forall_range_iff]
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
rw [inf_eq_iInf]
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
refine' locallyConvexSpace_iInf fun b => _
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
b : Bool
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
cases b
[GOAL]
case false
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
assumption
[GOAL]
case true
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
assumption
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : OrderedSemiring 𝕜
inst✝⁴ : AddCommMonoid E
inst✝³ : Module 𝕜 E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 F
t : TopologicalSpace F
inst✝ : LocallyConvexSpace 𝕜 F
f : E →ₗ[𝕜] F
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
letI : TopologicalSpace E := t.induced f
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : OrderedSemiring 𝕜
inst✝⁴ : AddCommMonoid E
inst✝³ : Module 𝕜 E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 F
t : TopologicalSpace F
inst✝ : LocallyConvexSpace 𝕜 F
f : E →ₗ[𝕜] F
this : TopologicalSpace E := induced (↑f) t
⊢ LocallyConvexSpace 𝕜 E
[PROOFSTEP]
refine'
  LocallyConvexSpace.ofBases 𝕜 E (fun _ => preimage f) (fun x => fun s : Set F => s ∈ 𝓝 (f x) ∧ Convex 𝕜 s) (fun x => _)
    fun x s ⟨_, hs⟩ => hs.linear_preimage f
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : OrderedSemiring 𝕜
inst✝⁴ : AddCommMonoid E
inst✝³ : Module 𝕜 E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 F
t : TopologicalSpace F
inst✝ : LocallyConvexSpace 𝕜 F
f : E →ₗ[𝕜] F
this : TopologicalSpace E := induced (↑f) t
x : E
⊢ HasBasis (𝓝 x) ((fun x s => s ∈ 𝓝 (↑f x) ∧ Convex 𝕜 s) x) ((fun x => preimage ↑f) x)
[PROOFSTEP]
rw [nhds_induced]
[GOAL]
ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : OrderedSemiring 𝕜
inst✝⁴ : AddCommMonoid E
inst✝³ : Module 𝕜 E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 F
t : TopologicalSpace F
inst✝ : LocallyConvexSpace 𝕜 F
f : E →ₗ[𝕜] F
this : TopologicalSpace E := induced (↑f) t
x : E
⊢ HasBasis (comap (↑f) (𝓝 (↑f x))) ((fun x s => s ∈ 𝓝 (↑f x) ∧ Convex 𝕜 s) x) ((fun x => preimage ↑f) x)
[PROOFSTEP]
exact (LocallyConvexSpace.convex_basis <| f x).comap f


[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
v w : V
hv : v ∈ M.verts
hvw : Adj M v w
⊢ toEdge h { val := v, property := hv } = { val := Quotient.mk (Sym2.Rel.setoid V) (v, w), property := hvw }
[PROOFSTEP]
simp only [IsMatching.toEdge, Subtype.mk_eq_mk]
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
v w : V
hv : v ∈ M.verts
hvw : Adj M v w
⊢ Quotient.mk (Sym2.Rel.setoid V) (v, Exists.choose (_ : ∃! w, Adj M (↑{ val := v, property := hv }) w)) =
    Quotient.mk (Sym2.Rel.setoid V) (v, w)
[PROOFSTEP]
congr
[GOAL]
case e_a.e_snd
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
v w : V
hv : v ∈ M.verts
hvw : Adj M v w
⊢ Exists.choose (_ : ∃! w, Adj M (↑{ val := v, property := hv }) w) = w
[PROOFSTEP]
exact ((h (M.edge_vert hvw)).choose_spec.2 w hvw).symm
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
⊢ Function.Surjective (toEdge h)
[PROOFSTEP]
rintro ⟨e, he⟩
[GOAL]
case mk
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
e : Sym2 V
he : e ∈ edgeSet M
⊢ ∃ a, toEdge h a = { val := e, property := he }
[PROOFSTEP]
refine Sym2.ind (fun x y he => ?_) e he
[GOAL]
case mk
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
e : Sym2 V
he✝ : e ∈ edgeSet M
x y : V
he : Quotient.mk (Sym2.Rel.setoid V) (x, y) ∈ edgeSet M
⊢ ∃ a, toEdge h a = { val := Quotient.mk (Sym2.Rel.setoid V) (x, y), property := he }
[PROOFSTEP]
exact ⟨⟨x, M.edge_vert he⟩, h.toEdge_eq_of_adj _ he⟩
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
v w : V
h : IsMatching M
hv : v ∈ M.verts
hw : w ∈ M.verts
ha : Adj M v w
⊢ toEdge h { val := v, property := hv } = toEdge h { val := w, property := hw }
[PROOFSTEP]
rw [h.toEdge_eq_of_adj hv ha, h.toEdge_eq_of_adj hw (M.symm ha), Subtype.mk_eq_mk, Sym2.eq_swap]
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
⊢ support M = M.verts
[PROOFSTEP]
refine M.support_subset_verts.antisymm fun v hv => ?_
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
v : V
hv : v ∈ M.verts
⊢ v ∈ support M
[PROOFSTEP]
obtain ⟨w, hvw, -⟩ := h hv
[GOAL]
case intro.intro
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
h : IsMatching M
v : V
hv : v ∈ M.verts
w : V
hvw : Adj M v w
⊢ v ∈ support M
[PROOFSTEP]
exact ⟨_, hvw⟩
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : (v : V) → Fintype ↑(neighborSet M v)
⊢ IsMatching M ↔ ∀ (v : V), v ∈ M.verts → degree M v = 1
[PROOFSTEP]
simp only [degree_eq_one_iff_unique_adj, IsMatching]
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h : IsMatching M
⊢ Even (Finset.card (Set.toFinset M.verts))
[PROOFSTEP]
classical
rw [isMatching_iff_forall_degree] at h
use M.coe.edgeFinset.card
rw [← two_mul, ← M.coe.sum_degrees_eq_twice_card_edges]
  -- Porting note: `SimpleGraph.Subgraph.coe_degree` does not trigger because it uses
    -- instance arguments instead of implicit arguments for the first `Fintype` argument.
    -- Using a `convert_to` to swap out the `Fintype` instance to the "right" one.
convert_to _ = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v using 3
simp [h, Finset.card_univ]
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h : IsMatching M
⊢ Even (Finset.card (Set.toFinset M.verts))
[PROOFSTEP]
rw [isMatching_iff_forall_degree] at h
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Even (Finset.card (Set.toFinset M.verts))
[PROOFSTEP]
use M.coe.edgeFinset.card
[GOAL]
case h
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Finset.card (Set.toFinset M.verts) =
    Finset.card (edgeFinset (Subgraph.coe M)) + Finset.card (edgeFinset (Subgraph.coe M))
[PROOFSTEP]
rw [← two_mul, ← M.coe.sum_degrees_eq_twice_card_edges]
  -- Porting note: `SimpleGraph.Subgraph.coe_degree` does not trigger because it uses
    -- instance arguments instead of implicit arguments for the first `Fintype` argument.
    -- Using a `convert_to` to swap out the `Fintype` instance to the "right" one.
[GOAL]
case h
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Finset.card (Set.toFinset M.verts) = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v
[PROOFSTEP]
convert_to _ = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v using 3
[GOAL]
case h.convert_2
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Finset.card (Set.toFinset M.verts) = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v
[PROOFSTEP]
simp [h, Finset.card_univ]
[GOAL]
V : Type u
G : SimpleGraph V
M : Subgraph G
⊢ IsPerfectMatching M ↔ ∀ (v : V), ∃! w, Adj M v w
[PROOFSTEP]
refine' ⟨_, fun hm => ⟨fun v _ => hm v, fun v => _⟩⟩
[GOAL]
case refine'_1
V : Type u
G : SimpleGraph V
M : Subgraph G
⊢ IsPerfectMatching M → ∀ (v : V), ∃! w, Adj M v w
[PROOFSTEP]
rintro ⟨hm, hs⟩ v
[GOAL]
case refine'_1.intro
V : Type u
G : SimpleGraph V
M : Subgraph G
hm : IsMatching M
hs : IsSpanning M
v : V
⊢ ∃! w, Adj M v w
[PROOFSTEP]
exact hm (hs v)
[GOAL]
case refine'_2
V : Type u
G : SimpleGraph V
M : Subgraph G
hm : ∀ (v : V), ∃! w, Adj M v w
v : V
⊢ v ∈ M.verts
[PROOFSTEP]
obtain ⟨w, hw, -⟩ := hm v
[GOAL]
case refine'_2.intro.intro
V : Type u
G : SimpleGraph V
M : Subgraph G
hm : ∀ (v : V), ∃! w, Adj M v w
v w : V
hw : Adj M v w
⊢ v ∈ M.verts
[PROOFSTEP]
exact M.edge_vert hw
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : (v : V) → Fintype ↑(neighborSet M v)
⊢ IsPerfectMatching M ↔ ∀ (v : V), degree M v = 1
[PROOFSTEP]
simp [degree_eq_one_iff_unique_adj, isPerfectMatching_iff]
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype V
h : IsPerfectMatching M
⊢ Even (Fintype.card V)
[PROOFSTEP]
classical simpa only [h.2.card_verts] using IsMatching.even_card h.1
[GOAL]
V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype V
h : IsPerfectMatching M
⊢ Even (Fintype.card V)
[PROOFSTEP]
simpa only [h.2.card_verts] using IsMatching.even_card h.1


[GOAL]
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
⊢ Free R (M →ₗ[R] N)
[PROOFSTEP]
cases subsingleton_or_nontrivial R
[GOAL]
case inl
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Subsingleton R
⊢ Free R (M →ₗ[R] N)
[PROOFSTEP]
apply Module.Free.of_subsingleton'
[GOAL]
case inr
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Nontrivial R
⊢ Free R (M →ₗ[R] N)
[PROOFSTEP]
classical exact Module.Free.of_equiv (LinearMap.toMatrix (chooseBasis R M) (chooseBasis R N)).symm
[GOAL]
case inr
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Nontrivial R
⊢ Free R (M →ₗ[R] N)
[PROOFSTEP]
exact Module.Free.of_equiv (LinearMap.toMatrix (chooseBasis R M) (chooseBasis R N)).symm
[GOAL]
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
⊢ Finite R (M →ₗ[R] N)
[PROOFSTEP]
cases subsingleton_or_nontrivial R
[GOAL]
case inl
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Subsingleton R
⊢ Finite R (M →ₗ[R] N)
[PROOFSTEP]
infer_instance
[GOAL]
case inr
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Nontrivial R
⊢ Finite R (M →ₗ[R] N)
[PROOFSTEP]
classical
have f := (LinearMap.toMatrix (chooseBasis R M) (chooseBasis R N)).symm
exact Module.Finite.of_surjective f.toLinearMap (LinearEquiv.surjective f)
[GOAL]
case inr
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Nontrivial R
⊢ Finite R (M →ₗ[R] N)
[PROOFSTEP]
have f := (LinearMap.toMatrix (chooseBasis R M) (chooseBasis R N)).symm
[GOAL]
case inr
R : Type u
M : Type v
N : Type w
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Free R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : Free R N
inst✝¹ : Finite R M
inst✝ : Finite R N
h✝ : Nontrivial R
f : Matrix (Free.ChooseBasisIndex R N) (Free.ChooseBasisIndex R M) R ≃ₗ[R] M →ₗ[R] N
⊢ Finite R (M →ₗ[R] N)
[PROOFSTEP]
exact Module.Finite.of_surjective f.toLinearMap (LinearEquiv.surjective f)
[GOAL]
R : Type u
M : Type v
N : Type w
inst✝⁹ : CommRing R
inst✝⁸ : StrongRankCondition R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Finite R M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : Module.Free R N
inst✝ : Module.Finite R N
⊢ finrank R (M →ₗ[R] N) = finrank R M * finrank R N
[PROOFSTEP]
classical
letI := nontrivial_of_invariantBasisNumber R
have h := LinearMap.toMatrix (chooseBasis R M) (chooseBasis R N)
simp_rw [h.finrank_eq, FiniteDimensional.finrank_matrix, FiniteDimensional.finrank_eq_card_chooseBasisIndex, mul_comm]
[GOAL]
R : Type u
M : Type v
N : Type w
inst✝⁹ : CommRing R
inst✝⁸ : StrongRankCondition R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Finite R M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : Module.Free R N
inst✝ : Module.Finite R N
⊢ finrank R (M →ₗ[R] N) = finrank R M * finrank R N
[PROOFSTEP]
letI := nontrivial_of_invariantBasisNumber R
[GOAL]
R : Type u
M : Type v
N : Type w
inst✝⁹ : CommRing R
inst✝⁸ : StrongRankCondition R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Finite R M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : Module.Free R N
inst✝ : Module.Finite R N
this : Nontrivial R := nontrivial_of_invariantBasisNumber R
⊢ finrank R (M →ₗ[R] N) = finrank R M * finrank R N
[PROOFSTEP]
have h := LinearMap.toMatrix (chooseBasis R M) (chooseBasis R N)
[GOAL]
R : Type u
M : Type v
N : Type w
inst✝⁹ : CommRing R
inst✝⁸ : StrongRankCondition R
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Finite R M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : Module.Free R N
inst✝ : Module.Finite R N
this : Nontrivial R := nontrivial_of_invariantBasisNumber R
h : (M →ₗ[R] N) ≃ₗ[R] Matrix (Module.Free.ChooseBasisIndex R N) (Module.Free.ChooseBasisIndex R M) R
⊢ finrank R (M →ₗ[R] N) = finrank R M * finrank R N
[PROOFSTEP]
simp_rw [h.finrank_eq, FiniteDimensional.finrank_matrix, FiniteDimensional.finrank_eq_card_chooseBasisIndex, mul_comm]
[GOAL]
R : Type u
M : Type v
N : Type w
K m n : Type u
inst✝³ : CommRing K
inst✝² : StrongRankCondition K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
w : m → K
v : n → K
⊢ LinearMap.rank (↑toLin' (vecMulVec w v)) ≤ 1
[PROOFSTEP]
rw [Matrix.vecMulVec_eq, Matrix.toLin'_mul]
[GOAL]
R : Type u
M : Type v
N : Type w
K m n : Type u
inst✝³ : CommRing K
inst✝² : StrongRankCondition K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
w : m → K
v : n → K
⊢ LinearMap.rank (LinearMap.comp (↑toLin' (col w)) (↑toLin' (row v))) ≤ 1
[PROOFSTEP]
refine' le_trans (LinearMap.rank_comp_le_left _ _) _
[GOAL]
R : Type u
M : Type v
N : Type w
K m n : Type u
inst✝³ : CommRing K
inst✝² : StrongRankCondition K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
w : m → K
v : n → K
⊢ LinearMap.rank (↑toLin' (col w)) ≤ 1
[PROOFSTEP]
refine' (LinearMap.rank_le_domain _).trans_eq _
[GOAL]
R : Type u
M : Type v
N : Type w
K m n : Type u
inst✝³ : CommRing K
inst✝² : StrongRankCondition K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
w : m → K
v : n → K
⊢ Module.rank K (Unit → K) = 1
[PROOFSTEP]
rw [rank_fun', Fintype.card_unit, Nat.cast_one]