Lean / Reader
Lean readerlp-bridge-check.lean
Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports OAI.Optimization.LinearProgramming.Optimization, which it does not have: you can read it there, but it will not check. Build the project itself to check it.
import OAI.Optimization.LinearProgramming.Optimization/-!# My bridge fileSmall statements that I derive from the two theorems of the claimant. The kernelof Lean checks each proof. The file is my own work.-/set_option maxHeartbeats 400000set_option format.width 1000namespace MobiusOtteropen Matrixopen OAI.Optimization.LinearProgramming/-! ## 1. The certificate of infeasibility is correct -//-- A Farkas certificate excludes a feasible point. -/theorem certificate_excludes_feasible_point {m d : ℕ} (A : Matrix (Fin m) (Fin d) ℚ)(b : Fin m → ℚ) {y : Fin m → ℚ} (hy : Certificate A b y) :¬ ∃ x, Feasible A b x := byunfold Certificate at hyrintro ⟨x, hx⟩obtain ⟨hy0, hyA, hyb, -⟩ := hyunfold Feasible at hxhave hle : y ⬝ᵥ (A *ᵥ x) ≤ y ⬝ᵥ b := byunfold dotProductexact Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_left (hx i) (hy0 i)have hzero : y ⬝ᵥ (A *ᵥ x) = 0 := byrw [dotProduct_mulVec, ← Matrix.mulVec_transpose, hyA]simprw [dotProduct_comm y b] at hlelinarith/-! ## 2. Feasibility -//-- For each rational instance with at least one constraint and one variable, a feasible pointexists or a Farkas certificate exists. -/theorem feasible_point_or_certificate (m d : ℕ) (hm : 0 < m) (hd : 0 < d)(A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ) :(∃ x, Feasible A b x) ∨ (∃ y, Certificate A b y) := byobtain ⟨p, c, e, bC, bE, h⟩ := strongly_polynomial_feasibilityobtain ⟨k, t, -, -, -, hout⟩ := h m d hm hd A bunfold FeasibilityOutput at houtrcases hout with ⟨-, h⟩ | ⟨-, h⟩· exact Or.inl ⟨_, h⟩· exact Or.inr ⟨_, h⟩/-! ## 3. Optimization -//-- The answer of the optimization program has one of three forms: a certificate ofinfeasibility, a primal point with a dual point of the same objective value, or a feasiblepoint with a ray. -/theorem optimization_three_answers (m d : ℕ) (hm : 0 < m) (hd : 0 < d)(A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ) (c : Fin d → ℚ) :(∃ y, Certificate A b y) ∨(∃ x y value, Feasible A b x ∧ 0 ≤ y ∧ A.transpose *ᵥ y = c ∧c ⬝ᵥ x = value ∧ b ⬝ᵥ y = value) ∨(∃ x v, Feasible A b x ∧ A *ᵥ v ≤ 0 ∧ c ⬝ᵥ v = 1) := byobtain ⟨p, c₀, e, bC, bE, h⟩ := strongly_polynomial_optimizationhave h3 : ∃ (k : ℕ) (t : Fin (k + 1) → RAM.State ℚ),RAM.Trace p (RAM.start [m, d] (lpInput A b ++ List.ofFn c)) k t ∧k ≤ RAM.polyBound c₀ e (m + d) ∧(∀ i, RAM.scalarBound(RAM.polyBound bC bE (RAM.totalBits (lpInput A b ++ List.ofFn c))) (t i)) ∧OptimizationOutput A b c (t (Fin.last k)) := h m d hm hd A b cobtain ⟨k, t, -, -, -, hout⟩ := h3unfold OptimizationOutput at houtrcases hout with ⟨-, hy⟩ | ⟨-, hx, hy0, hyA, hcv, hbv, -⟩ | ⟨-, hx, hv, hcv⟩· exact Or.inl ⟨_, hy⟩· exact Or.inr (Or.inl ⟨_, _, _, hx, hy0, hyA, hcv, hbv⟩)· exact Or.inr (Or.inr ⟨_, _, hx, hv, hcv⟩)/-- A feasible point and a ray with `A *ᵥ v ≤ 0` and `c ⬝ᵥ v = 1` give a feasible point foreach nonnegative step length `r`. The objective value is larger by `r`. -/theorem ray_gives_large_values {m d : ℕ} (A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ)(c : Fin d → ℚ) {x v : Fin d → ℚ} (hx : Feasible A b x) (hv : A *ᵥ v ≤ 0)(hcv : c ⬝ᵥ v = 1) {r : ℚ} (hr : 0 ≤ r) :Feasible A b (x + r • v) ∧ c ⬝ᵥ (x + r • v) = c ⬝ᵥ x + r := byunfold Feasible at hxconstructor· unfold Feasiblehave hA : A *ᵥ (x + r • v) = A *ᵥ x + r • A *ᵥ v := byrw [Matrix.mulVec_add, Matrix.mulVec_smul]rw [hA]intro ihave hvi : (A *ᵥ v) i ≤ (0 : ℚ) := hv ihave h2 := mul_le_mul_of_nonneg_left hvi hrrw [mul_zero] at h2show (A *ᵥ x) i + r * (A *ᵥ v) i ≤ b ilinarith [hx i]· simp only [dotProduct_add, dotProduct_smul, hcv, smul_eq_mul, mul_one]/-- The duality theorem for rational linear programs, as a consequence. If the problem isfeasible and bounded, then a primal optimum and a dual optimum of the same value exist. -/theorem duality_of_feasible_bounded (m d : ℕ) (hm : 0 < m) (hd : 0 < d)(A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ) (c : Fin d → ℚ)(hfeas : ∃ x, Feasible A b x) (hbounded : ∃ M, ∀ x, Feasible A b x → c ⬝ᵥ x ≤ M) :∃ x y value, Feasible A b x ∧ 0 ≤ y ∧ A.transpose *ᵥ y = c ∧ c ⬝ᵥ x = value ∧b ⬝ᵥ y = value ∧ ∀ z, Feasible A b z → c ⬝ᵥ z ≤ value := byrcases optimization_three_answers m d hm hd A b c with hy | h | h· obtain ⟨y, hy⟩ := hyexact absurd hfeas (certificate_excludes_feasible_point A b hy)· obtain ⟨x, y, value, hx, hy0, hyA, hcv, hbv⟩ := hrefine ⟨x, y, value, hx, hy0, hyA, hcv, hbv, fun z hz => ?_⟩have h1 : c ⬝ᵥ z = (A *ᵥ z) ⬝ᵥ y := byrw [← hyA, dotProduct_comm, dotProduct_mulVec, Matrix.vecMul_transpose]have h2 : (A *ᵥ z) ⬝ᵥ y ≤ b ⬝ᵥ y := byunfold dotProductunfold Feasible at hzexact Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_right (hz i) (hy0 i)linarith· obtain ⟨x, v, hx, hv, hcv⟩ := hobtain ⟨M, hM⟩ := hboundedhave key : ∀ r : ℚ, 0 ≤ r → Feasible A b (x + r • v) ∧ c ⬝ᵥ (x + r • v) = c ⬝ᵥ x + r :=fun r hr => ray_gives_large_values A b c hx hv hcv hrobtain ⟨hfeas2, hval⟩ := key (max 0 (M - c ⬝ᵥ x) + 1) (by positivity)have hle := hM _ hfeas2rw [hval] at hlehave hmax : M - c ⬝ᵥ x ≤ max 0 (M - c ⬝ᵥ x) := le_max_right _ _linarith/-! ## 4. The address registers stay smallThe statement of the claimant bounds the bit length of the data registers. It does notbound the address registers. The results in this section show that each address registerstays below `B + (the number of steps so far)` when the registers start at most `B`. -//-- The largest constant that one instruction can write into an address register. -/def instrAddressConst : RAM.Instr → ℕ| .addrConst _ n => n| _ => 0/-- The largest constant that a program can write into an address register. -/def programAddressConst : RAM.Program → ℕ| [] => 0| i :: p => max (instrAddressConst i) (programAddressConst p)theorem instrAddressConst_le_mem {i : RAM.Instr} : ∀ {p : RAM.Program}, i ∈ p →instrAddressConst i ≤ programAddressConst p := byintro pinduction p with| nil => intro h; cases h| cons a p ih =>intro hrcases List.mem_cons.mp h with h | h· subst hexact le_max_left _ _· exact le_trans (ih h) (le_max_right _ _)/-- One step increases no address register beyond `B + 1`, if all address registers are atmost `B` and `B` is at least each constant of the program. -/theorem step_address_bound {p : RAM.Program} {B : ℕ} (hB : programAddressConst p ≤ B){s s' : RAM.State ℚ} (h : RAM.step p s = some s') (hs : ∀ j, s.index j ≤ B) :∀ j, s'.index j ≤ B + 1 := bycases h0 : s.output with| none =>cases hi : p[s.pc]? with| none =>simp only [RAM.step, h0, hi] at hexact absurd h (by simp)| some i =>simp only [RAM.step, h0, hi] at hhave hiB : instrAddressConst i ≤ B :=le_trans (instrAddressConst_le_mem (List.mem_of_getElem? hi)) hBcases i with| const d q =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| copy d a =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| add d a b =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| sub d a b =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| mul d a b =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| div d a b =>simp only [RAM.execInstr] at hsplit at h· exact absurd h (by simp)· cases hintro jexact (hs j).trans (Nat.le_succ B)| load d a =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| store a d =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| addrConst d n =>simp only [RAM.execInstr] at hcases hsimp only [RAM.State.putIndex, Function.update_apply]simp only [instrAddressConst] at hiBintro jsplit· omega· have hj := hs jomega| addrCopy d a =>simp only [RAM.execInstr] at hcases hsimp only [RAM.State.putIndex, Function.update_apply]intro jsplit· have ha := hs aomega· have hj := hs jomega| incr d a =>simp only [RAM.execInstr] at hcases hsimp only [RAM.State.putIndex, Function.update_apply]intro jsplit· have ha := hs aomega· have hj := hs jomega| decr d a =>simp only [RAM.execInstr] at hcases hsimp only [RAM.State.putIndex, Function.update_apply]intro jsplit· have ha := hs aomega· have hj := hs jomega| addrLoad d a =>simp only [RAM.execInstr] at hcases hsimp only [RAM.State.putIndex, Function.update_apply]intro jsplit· have ha := hs (s.index a)omega· have hj := hs jomega| addrStore a d =>simp only [RAM.execInstr] at hcases hsimp only [RAM.State.putIndex, Function.update_apply]intro jsplit· have ha := hs domega· have hj := hs jomega| branchLT a b yes no =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| branchAddrLT a b yes no =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| jump target =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| halt tag =>simp only [RAM.execInstr] at hcases hintro jexact (hs j).trans (Nat.le_succ B)| some x =>simp only [RAM.step, h0] at hexact absurd h (by simp)/-- Along the steps of a trace, each address register stays below `B + (the number of stepsso far)`. -/theorem address_bound_of_steps {p : RAM.Program} {k : ℕ} {t : Fin (k + 1) → RAM.State ℚ}(hstep : ∀ i : Fin k, RAM.step p (t i.castSucc) = some (t i.succ)) {B : ℕ}(hB : programAddressConst p ≤ B) (h0 : ∀ j, (t 0).index j ≤ B) (i : Fin (k + 1)) (j : ℕ) :(t i).index j ≤ B + i := byhave key : ∀ (n : ℕ) (hn : n < k + 1) (j : ℕ), (t ⟨n, hn⟩).index j ≤ B + n := byintro ninduction n with| zero => intro hn j; simpa using h0 j| succ n ih =>intro hn jhave hnk : n < k := Nat.lt_of_succ_lt_succ hnhave hs : RAM.step p (t ⟨n, Nat.lt_succ_of_lt hnk⟩) = some (t ⟨n + 1, hn⟩) :=hstep ⟨n, hnk⟩have hprev : ∀ j', (t ⟨n, Nat.lt_succ_of_lt hnk⟩).index j' ≤ B + n :=fun j' => ih (Nat.lt_succ_of_lt hnk) j'have hBn : programAddressConst p ≤ B + n := le_trans hB (Nat.le_add_right _ _)exact (step_address_bound hBn hs hprev j).trans (by omega)exact key i i.isLt j/-- The address registers of the start state hold `m`, `d` and zero. -/theorem start_address_le (m d B : ℕ) (hm : m ≤ B) (hd : d ≤ B) (input : List ℚ) (j : ℕ) :(RAM.start [m, d] input).index j ≤ B := byshow ([m, d][j]?.getD 0 : ℕ) ≤ Bcases j with| zero => exact hm| succ j =>cases j with| zero => exact hd| succ j => simp/-- In the run of a program from the start state, each address register is at most`B + (the number of steps so far)`. Here `B` is at least `m`, `d` and each constant of theprogram. -/theorem address_registers_stay_small {m d : ℕ} {input : List ℚ} {p : RAM.Program} {k : ℕ}{t : Fin (k + 1) → RAM.State ℚ} (htr : RAM.Trace p (RAM.start [m, d] input) k t){B : ℕ} (hB : programAddressConst p ≤ B) (hm : m ≤ B) (hd : d ≤ B)(i : Fin (k + 1)) (j : ℕ) : (t i).index j ≤ B + i := byunfold RAM.Trace at htrobtain ⟨h0eq, hstep⟩ := htrrefine address_bound_of_steps hstep hB (fun j => ?_) i jrw [h0eq]exact start_address_le m d B hm hd input j/-- The number of bits of each address register is less than `log2 (B + k) + 1`. -/theorem address_register_bits {m d : ℕ} {input : List ℚ} {p : RAM.Program} {k : ℕ}{t : Fin (k + 1) → RAM.State ℚ} (htr : RAM.Trace p (RAM.start [m, d] input) k t){B : ℕ} (hB : programAddressConst p ≤ B) (hm : m ≤ B) (hd : d ≤ B)(i : Fin (k + 1)) (j : ℕ) : Nat.log2 ((t i).index j) < Nat.log2 (B + k) + 1 := byhave h1 : (t i).index j ≤ B + k := byhave h := address_registers_stay_small htr hB hm hd i jomegarcases Nat.eq_zero_or_pos ((t i).index j) with hn | hn· simp [hn]· rw [Nat.log2_lt hn.ne']have hmpos : 0 < B + k := lt_of_lt_of_le hn h1exact lt_of_le_of_lt h1 ((Nat.log2_lt hmpos.ne').mp (Nat.lt_succ_self _))/-- The feasibility theorem without the abbreviations of the claimant. The number of stepsis at most `c * (m + d + 1) ^ e`. Each data register has at most `bC * (totalBits + 1) ^ bE`bits. Each address register is at most `max (max m d) (programAddressConst p) + (the numberof steps so far)`. -/theorem feasibility_explicit (m d : ℕ) (hm : 0 < m) (hd : 0 < d)(A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ) :∃ (p : RAM.Program) (c e bC bE : ℕ), ∃ (k : ℕ) (t : Fin (k + 1) → RAM.State ℚ),RAM.Trace p (RAM.start [m, d] (lpInput A b)) k t ∧k ≤ c * (m + d + 1) ^ e ∧(∀ i j, RAM.ratBits ((t i).data j) ≤ bC * (RAM.totalBits (lpInput A b) + 1) ^ bE) ∧(∀ i j, (t i).index j ≤ max (max m d) (programAddressConst p) + i) ∧FeasibilityOutput A b (t (Fin.last k)) := byobtain ⟨p, c, e, bC, bE, h⟩ := strongly_polynomial_feasibilityobtain ⟨k, t, htr, hk, hb, hout⟩ := h m d hm hd A brefine ⟨p, c, e, bC, bE, k, t, htr, hk, fun i j => hb i j, ?_, hout⟩exact address_registers_stay_small htr (le_max_right _ _)(le_trans (le_max_left m d) (le_max_left _ _))(le_trans (le_max_right m d) (le_max_left _ _))/-! ## 5. The two statements in plain wordsEach restatement in this section does not use the definitions `StronglyPolynomialFeasibility`,`StronglyPolynomialOptimization`, `Trace`, `polyBound`, `scalarBound`, `ratBits`, `start`,`readVector`, `Feasible`, `Certificate`, `FeasibilityOutput` and `OptimizationOutput`.Each proof is the theorem of the claimant itself. Lean accepts a proof only if therestatement and the statement of the claimant are the same by definition. -//-- The input tape holds the rows of `A`, then `b`. -/theorem lpInput_is {m d : ℕ} (A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ) :lpInput A b = (List.ofFn fun i => List.ofFn (A i)).flatten ++ List.ofFn b := rfl/-- The bit length of a rational number is 3, plus the binary length of its numerator,plus the binary length of its denominator. -/theorem ratBits_is (q : ℚ) :RAM.ratBits q = 3 + q.num.natAbs.log2 + q.den.log2 := rfl/-- Feasibility in plain words. One list of instructions `p` and four constants `c`, `e`,`bC`, `bE` come before all inputs. For each rational instance with `m ≥ 1` constraints and`d ≥ 1` variables, there is a run of the machine that starts on the input and follows theprogram at each step. The run has at most `c * (m + d + 1) ^ e` steps. Each data registerat each step has at most `bC * (totalBits + 1) ^ bE` bits. The last state holds either(tag 0) a feasible point, or (tag 1) a Farkas certificate with at most `rank A + 1`nonzero entries. -/theorem feasibility_in_plain_words :∃ (p : List RAM.Instr) (c e bC bE : ℕ), ∀ (m d : ℕ), 0 < m → 0 < d →∀ (A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ),∃ (k : ℕ) (t : Fin (k + 1) → RAM.State ℚ),((t 0 = ⟨0, fun i => (lpInput A b)[i]?.getD 0, fun i => [m, d][i]?.getD 0, none⟩ ∧(∀ i : Fin k, RAM.step p (t i.castSucc) = some (t i.succ))) ∧k ≤ c * (m + d + 1) ^ e ∧(∀ (i : Fin (k + 1)) (j : ℕ),3 + ((t i).data j).num.natAbs.log2 + ((t i).data j).den.log2 ≤bC * (RAM.totalBits (lpInput A b) + 1) ^ bE) ∧(((t (Fin.last k)).output = some 0 ∧A *ᵥ (fun i => (t (Fin.last k)).data (0 + ↑i)) ≤ b) ∨((t (Fin.last k)).output = some 1 ∧0 ≤ (fun i : Fin m => (t (Fin.last k)).data (0 + ↑i)) ∧Aᵀ *ᵥ (fun i : Fin m => (t (Fin.last k)).data (0 + ↑i)) = 0 ∧b ⬝ᵥ (fun i : Fin m => (t (Fin.last k)).data (0 + ↑i)) < 0 ∧(Finset.univ.filter fun i : Fin m => (t (Fin.last k)).data (0 + ↑i) ≠ 0).card ≤A.rank + 1))) :=strongly_polynomial_feasibility/-- Optimization in plain words. The form is the same. The input tape holds the rows of`A`, then `b`, then the objective `obj`. The last state holds one of three answers.(Tag 0) A Farkas certificate of infeasibility.(Tag 1) A primal point `x`, a dual point `y` and a common value: `x` is feasible, `y` isnonnegative, `Aᵀ y = obj`, the objective value of `x` is the common value, `b ⬝ᵥ y` isthe common value, and no feasible point has a larger objective value.(Tag 2) A feasible point and a ray `v` with `A v ≤ 0` and `obj ⬝ᵥ v = 1`. -/theorem optimization_in_plain_words :∃ (p : List RAM.Instr) (c e bC bE : ℕ), ∀ (m d : ℕ), 0 < m → 0 < d →∀ (A : Matrix (Fin m) (Fin d) ℚ) (b : Fin m → ℚ) (obj : Fin d → ℚ),∃ (k : ℕ) (t : Fin (k + 1) → RAM.State ℚ),((t 0 = ⟨0, fun i => (lpInput A b ++ List.ofFn obj)[i]?.getD 0,fun i => [m, d][i]?.getD 0, none⟩ ∧(∀ i : Fin k, RAM.step p (t i.castSucc) = some (t i.succ))) ∧k ≤ c * (m + d + 1) ^ e ∧(∀ (i : Fin (k + 1)) (j : ℕ),3 + ((t i).data j).num.natAbs.log2 + ((t i).data j).den.log2 ≤bC * (RAM.totalBits (lpInput A b ++ List.ofFn obj) + 1) ^ bE) ∧(((t (Fin.last k)).output = some 0 ∧0 ≤ (fun i : Fin m => (t (Fin.last k)).data (0 + ↑i)) ∧Aᵀ *ᵥ (fun i : Fin m => (t (Fin.last k)).data (0 + ↑i)) = 0 ∧b ⬝ᵥ (fun i : Fin m => (t (Fin.last k)).data (0 + ↑i)) < 0 ∧(Finset.univ.filter fun i : Fin m => (t (Fin.last k)).data (0 + ↑i) ≠ 0).card ≤A.rank + 1) ∨((t (Fin.last k)).output = some 1 ∧A *ᵥ (fun i : Fin d => (t (Fin.last k)).data (0 + ↑i)) ≤ b ∧0 ≤ (fun i : Fin m => (t (Fin.last k)).data (d + ↑i)) ∧Aᵀ *ᵥ (fun i : Fin m => (t (Fin.last k)).data (d + ↑i)) = obj ∧obj ⬝ᵥ (fun i : Fin d => (t (Fin.last k)).data (0 + ↑i)) =(t (Fin.last k)).data (d + m) ∧b ⬝ᵥ (fun i : Fin m => (t (Fin.last k)).data (d + ↑i)) =(t (Fin.last k)).data (d + m) ∧∀ z : Fin d → ℚ, A *ᵥ z ≤ b →obj ⬝ᵥ z ≤ (t (Fin.last k)).data (d + m)) ∨((t (Fin.last k)).output = some 2 ∧A *ᵥ (fun i : Fin d => (t (Fin.last k)).data (0 + ↑i)) ≤ b ∧A *ᵥ (fun i : Fin d => (t (Fin.last k)).data (d + ↑i)) ≤ 0 ∧obj ⬝ᵥ (fun i : Fin d => (t (Fin.last k)).data (d + ↑i)) = 1))) :=strongly_polynomial_optimizationend MobiusOtter-- Readable form of my two restatements.#check @MobiusOtter.feasibility_in_plain_words#check @MobiusOtter.optimization_in_plain_words-- Axioms of my statements and of the two theorems of the claimant.#print axioms OAI.Optimization.LinearProgramming.strongly_polynomial_feasibility#print axioms OAI.Optimization.LinearProgramming.strongly_polynomial_optimization#print axioms MobiusOtter.certificate_excludes_feasible_point#print axioms MobiusOtter.feasible_point_or_certificate#print axioms MobiusOtter.optimization_three_answers#print axioms MobiusOtter.ray_gives_large_values#print axioms MobiusOtter.duality_of_feasible_bounded#print axioms MobiusOtter.step_address_bound#print axioms MobiusOtter.address_bound_of_steps#print axioms MobiusOtter.start_address_le#print axioms MobiusOtter.address_registers_stay_small#print axioms MobiusOtter.address_register_bits#print axioms MobiusOtter.feasibility_explicit#print axioms MobiusOtter.lpInput_is#print axioms MobiusOtter.ratBits_is#print axioms MobiusOtter.feasibility_in_plain_words#print axioms MobiusOtter.optimization_in_plain_words