{"id":24513818,"url":"https://github.com/madvorak/duality","last_synced_at":"2025-12-30T18:14:26.946Z","repository":{"id":248910560,"uuid":"830078363","full_name":"madvorak/duality","owner":"madvorak","description":"Duality theory in linear optimization and its extensions","archived":false,"fork":false,"pushed_at":"2025-01-20T10:26:41.000Z","size":16586,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T10:31:12.761Z","etag":null,"topics":["lean4","linear-algebra","linear-programming"],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madvorak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-17T14:43:59.000Z","updated_at":"2025-01-20T10:26:42.000Z","dependencies_parsed_at":"2024-08-26T09:38:36.268Z","dependency_job_id":"5e6a87d1-8d0d-43b6-ad78-44d781a16464","html_url":"https://github.com/madvorak/duality","commit_stats":null,"previous_names":["madvorak/duality"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madvorak%2Fduality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madvorak%2Fduality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madvorak%2Fduality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madvorak%2Fduality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madvorak","download_url":"https://codeload.github.com/madvorak/duality/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243714974,"owners_count":20335845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lean4","linear-algebra","linear-programming"],"created_at":"2025-01-22T00:56:37.615Z","updated_at":"2025-12-30T18:14:26.898Z","avatar_url":"https://github.com/madvorak.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Duality theory in linear optimization and its extensions\n\nFarkas established that a system of linear inequalities has a solution if and only if we cannot obtain\na contradiction by taking a linear combination of the inequalities.\nWe state and formally prove several Farkas-like theorems in Lean 4.\nFurthermore, we consider a linearly ordered field extended with two special elements denoted by $\\bot$ and $\\top$\nwhere $\\bot$ is below every element and $\\top$ is above every element.\nWe define $\\bot + a = \\bot = a + \\bot$ for all $a$ and we define $\\top + b = \\top = b + \\top$ for all $b \\neq \\bot$.\nInstead of multiplication, we define scalar action $c \\bullet \\bot = \\bot$ for every $c \\ge 0$ but we define\n$d \\bullet \\top = \\top$ only for $d \u003e 0$ because $0 \\bullet \\top = 0$.\nWe extend certain Farkas-like theorems to a setting where coefficients are from an extended linearly ordered field.\n\n![AI-generated image](nonLean/AI-generated.jpg)\n\n[Technical report](https://arxiv.org/abs/2409.08119)\n\n\n## Main corollaries\n\n* [Farkas for equalities](https://github.com/madvorak/duality/blob/ea1887033d86c29999f64a6d5c056d2267f3814c/Duality/FarkasBasic.lean#L24)\n* [Farkas for inequalities](https://github.com/madvorak/duality/blob/ea1887033d86c29999f64a6d5c056d2267f3814c/Duality/FarkasBasic.lean#L101)\n* [Strong duality for standard LP](https://github.com/madvorak/duality/blob/ea1887033d86c29999f64a6d5c056d2267f3814c/Duality/LinearProgrammingB.lean#L203)\n\n\n## Main results\n\n* [Farkas-Bartl theorem](https://github.com/madvorak/duality/blob/ea1887033d86c29999f64a6d5c056d2267f3814c/Duality/FarkasBartl.lean#L216)\n* [Extended Farkas theorem](https://github.com/madvorak/duality/blob/ea1887033d86c29999f64a6d5c056d2267f3814c/Duality/FarkasSpecial.lean#L284)\n* [Strong duality for extended LP](https://github.com/madvorak/duality/blob/ea1887033d86c29999f64a6d5c056d2267f3814c/Duality/LinearProgramming.lean#L1083)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadvorak%2Fduality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadvorak%2Fduality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadvorak%2Fduality/lists"}