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

Linear programming according to Antoine Chambert-Loir's book #10026

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

Conversation

madvorak
Copy link
Collaborator

@madvorak madvorak commented Jan 26, 2024


Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.237386.20Linear.20Programming

Four PRs incompatible with each other:
#7386 (list of constraints)
#9693 (matrix form)
#10026 (Antoine Chambert-Loir's def; semirings, linear)
#10159 (Antoine Chambert-Loir's def; rings, affine)

Open in Gitpod

@madvorak madvorak added the WIP Work in progress label Jan 26, 2024
@madvorak madvorak changed the title this LP is definitely wrong Linear programming according to Antoine Chambert-Loir's book Jan 29, 2024
@madvorak madvorak added RFC Request for comment and removed WIP Work in progress labels Jan 30, 2024

/-- Typically `M` is `ℝ^m` and `N` is `ℝ^n` -/
structure LinearProgram (R : Type*) (M : Type*) (N : Type*)
[OrderedSemiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] where
Copy link
Member

Choose a reason for hiding this comment

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

I think it probably makes sense to generalize M to an affine space, though I guess you'd be trading no negation for no origin, as we don't have a typeclass that means neither...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is there any literature for the theory of linear programming over affine spaces?

Copy link
Member

Choose a reason for hiding this comment

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

In my experience it's uncommon to require that the objective be zero at the origin; especially since often when a function is described as "linear" it really means "affine"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aren't we talking about two different things at the same time?

The first thing, which is a pretty small change, is to allow affine functions in addition to linear functions in the objective.

The second thing, which is quite nontrivial, is to deny that the space of solutions contains some zero solution (which may be infeasible), even if the objective value for zero solution is not required to be zero.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sketch what it could look like with affine stuff:
#10159

@riccardobrasca
Copy link
Member

If this PR is not ready for review can you label it WIP please? Thanks!

@riccardobrasca riccardobrasca added the awaiting-author A reviewer has asked the author a question or requested changes label Jul 3, 2024
@madvorak
Copy link
Collaborator Author

madvorak commented Jul 3, 2024

If this PR is not ready for review can you label it WIP please? Thanks!

Instead of RFC, or in addition to RFC?

@riccardobrasca
Copy link
Member

If this PR is not ready for review can you label it WIP please? Thanks!

Instead of RFC, or in addition to RFC?

In addition. We are thinking about a different way of managing PRs and we would like to use more ofter "WIP" (I think you have a couple of other PRs in the same state). Thanks!

@madvorak
Copy link
Collaborator Author

madvorak commented Jul 3, 2024

If this PR is not ready for review can you label it WIP please? Thanks!

Instead of RFC, or in addition to RFC?

In addition. We are thinking about a different way of managing PRs and we would like to use more ofter "WIP" (I think you have a couple of other PRs in the same state). Thanks!

OK, I will label all four LP PRs with WIP in addition to RFC.

@madvorak madvorak added WIP Work in progress and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jul 3, 2024
@madvorak madvorak added the t-algebra Algebra (groups, rings, fields, etc) label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comment t-algebra Algebra (groups, rings, fields, etc) WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants