Skip to content

Commit fedfe24

Browse files
committed
chore(Combinatorics): golf some graph proofs (#31126)
1 parent 22d4766 commit fedfe24

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Mathlib/Combinatorics/Digraph/Orientation.lean

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,12 @@ lemma toSimpleGraphStrict_subgraph_toSimpleGraphInclusive (G : Digraph V) :
6060
fun _ _ h ↦ ⟨h.1, Or.inl h.2.1
6161

6262
@[mono]
63-
lemma toSimpleGraphInclusive_mono : Monotone (toSimpleGraphInclusive : _ → SimpleGraph V) := by
64-
intro _ _ h₁ _ _ h₂
65-
apply And.intro h₂.1
66-
cases h₂.2
67-
· exact Or.inl <| h₁ ‹_›
68-
· exact Or.inr <| h₁ ‹_›
63+
lemma toSimpleGraphInclusive_mono : Monotone (toSimpleGraphInclusive : _ → SimpleGraph V) :=
64+
fun _ _ h₁ _ _ h₂ ↦ ⟨h₂.1, h₂.2.imp (@h₁ _ _) (@h₁ _ _)⟩
6965

7066
@[mono]
7167
lemma toSimpleGraphStrict_mono : Monotone (toSimpleGraphStrict : _ → SimpleGraph V) :=
72-
fun _ _ h₁ _ _ h₂ ↦ And.intro h₂.1 <| And.intro (h₁ h₂.2.1) (h₁ h₂.2.2)
68+
fun _ _ h₁ _ _ h₂ ↦ h₂.1, h₁ h₂.2.1, h₁ h₂.2.2
7369

7470
@[simp]
7571
lemma toSimpleGraphInclusive_top : (⊤ : Digraph V).toSimpleGraphInclusive = ⊤ := by

Mathlib/Combinatorics/SimpleGraph/Maps.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,8 @@ lemma comap_symm (G : SimpleGraph V) (e : V ≃ W) :
125125
lemma map_symm (G : SimpleGraph W) (e : V ≃ W) :
126126
G.map e.symm.toEmbedding = G.comap e.toEmbedding := by rw [← comap_symm, e.symm_symm]
127127

128-
theorem comap_monotone (f : V ↪ W) : Monotone (SimpleGraph.comap f) := by
129-
intro G G' h _ _ ha
130-
exact h ha
128+
theorem comap_monotone (f : V ↪ W) : Monotone (SimpleGraph.comap f) :=
129+
fun _ _ h _ _ ha ↦ h ha
131130

132131
@[simp] lemma comap_bot (f : V → W) : (emptyGraph W).comap f = emptyGraph V := rfl
133132

0 commit comments

Comments
 (0)