Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(library): weak duality of max-flow min-cut theorem #18996

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

amilchew
Copy link
Collaborator

@amilchew amilchew commented May 12, 2023

Formalise and validate the weak duality of the max-flow min-cut theorem, i.e. the value of every flow is less than or equal to the capacity of every cut.

The rest of the max-flow min-cut theorem proof is commented out because it contains sorry.


Open in Gitpod

@amilchew amilchew added the awaiting-review The author would like community review of the PR label May 12, 2023
@amilchew amilchew requested a review from a team as a code owner May 12, 2023 10:41
@amilchew amilchew changed the title Max flow min cut feat(library):weak duality of max-flow min-cut theorem May 12, 2023
@amilchew amilchew changed the title feat(library):weak duality of max-flow min-cut theorem feat(library): weak duality of max-flow min-cut theorem May 12, 2023
leanpkg.toml Outdated
@@ -5,3 +5,4 @@ lean_version = "leanprover-community/lean:3.50.3"
path = "src"

[dependencies]
mathlib = {git = "https://github.com/leanprover-community/mathlib", rev = "290a7ba01fbcab1b64757bdaa270d28f4dcede35"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make any sense in mathlib itself!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Comment on lines 814 to 821
-- /-!
-- Here is our second big lemma, if the active flow is maximum,
-- then no augmenting path exists in the residual network.
-- -/

-- lemma no_augm_path {V : Type*} [inst' : fintype V]
-- (rsn : residual_network V) : (is_max_flow rsn.afn) -> no_augmenting_path rsn :=
-- begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is intended to be part of a later PR, you should just delete it from this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should either be:

  • Hosted on your own website / arxiv, and linked from references.bib
  • Put in the module docstring, or in various smaller docstrings throughout the file. Note that the doc website supports LaTeX in $$s

(is_edge : V → V → Prop)
(nonsymmetric : ∀ u v : V, ¬ ((is_edge u v) ∧ (is_edge v u)))

structure capacity (V : Type*) [inst : fintype V]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this looks like it would work better as

Suggested change
structure capacity (V : Type*) [inst : fintype V]
structure capacity {V : Type*} [inst : fintype V] (g : digraph V)

Which says "a capacity on a particular graph". I assume you don't ever need to compare capacities between different graphs?

@semorrison semorrison added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review The author would like community review of the PR too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants