FormalConjectures/Paper/BranchingVAS.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
14 declarations, 1 contain sorry, 0 declared as axioms
Decidability of reachability for branching vector addition systems
A branching vector addition system (BVAS) of dimension d is given by a finite
list of axioms, a finite list of unary rules, and a finite list of binary
rules, each of which is a vector in ℤ^d. A configuration is a vector in ℕ^d,
which here is represented as a vector v ∈ ℤ^d subject to 0 ≤ v. The set of
reachable configurations is defined inductively:
- every axiom that is a valid configuration (i.e. lies in
ℕ^d) is reachable; - if
vis a reachable configuration,ris a unary rule andv + r ∈ ℕ^d, thenv + ris reachable; - if
v₁, v₂are both reachable configurations,ris a binary rule andv₁ + v₂ + r ∈ ℕ^d, thenv₁ + v₂ + ris reachable.
Modelling axioms as vectors in ℤ^d and only counting the non-negative ones as
reachable yields the same set of reachable configurations as the usual definition
in which axioms are required to lie in ℕ^d.
Branching vector addition systems are distinguished from ordinary vector addition systems (VAS) by allowing binary rules. VAS reachability is known to be decidable.
References:
- The covering and boundedness problems for branching vector addition systems (Stéphane Demri, Marcin Jurdziński, Oded Lachish, Ranko Lazić, FSTTCS 2009) Gives a similar definition of BVAS, and compares it to related equivalent definitions.
- On the Reachability Problem for Two-Dimensional Branching VASS by Clotilde Bizière, Thibault Hilaire, Jérôme Leroux, Grégoire Sutre, MFCS 2025, which settles the two-dimensional case and states that "the decidability status of the reachability problem for BVASS remains open in higher dimensions".
- The General Vector Addition System Reachability Problem by Presburger Inductive Invariants by Jérôme Leroux (2010), for the decidability of reachability for ordinary VAS.
- Solving the Reachability Problem for Branching Vector Addition Systems via Semilinear Inductive Invariants by Clotilde Bizière, Jérôme Leroux, Grégoire Sutre (2026), a recent preprint claiming a positive resolution to the conjecture: reachability for branching vector addition systems is decidable.
Imports (1)
- structure
BranchingVAS.BvasA branching vector addition system of dimensiondline 65 sourceSource documentation
A branching vector addition system of dimension
d.no axioms what this means
Statement uses:
Natstructure Bvas (d : ℕ) where …
- inductive
BranchingVAS.Bvas.ReachableThe reachable configurations of a branching vector addition system line 71 sourceSource documentation
The reachable configurations of a branching vector addition system.
standard axioms: propext what this means
Statement uses:
Nat, BranchingVAS.Bvas,Fin,Intinductive Bvas.Reachable {d : ℕ} (b : Bvas d) : (Fin d → ℤ) → Prop | base {v : Fin d → ℤ} (hmem : v ∈ b.axioms) (hcfg : 0 ≤ v) : b.Reachable v | unary {v r w : Fin d → ℤ} (hv : b.Reachable v) (hr : r ∈ b.unaryRules) (hcfg : 0 ≤ w) (hw : w = v + r) : b.Reachable w | binary {v₁ v₂ r w : Fin d → ℤ} (hv₁ : b.Reachable v₁) (hv₂ : b.Reachable v₂) (hr : r ∈ b.binaryRules) (hcfg : 0 ≤ w) (hw : w = v₁ + v₂ + r) : b.Reachable w /-- The vector in `ℤ^d` whose `i`-th coordinate is the `i`-th entry of the list `l`, or `0` if `l` has fewer than `i + 1` entries. Used to encode the inputs of the reachability problem. -/Mentions: BranchingVAS.Bvas
- def
BranchingVAS.vecOfListThe vector inℤ^dwhosei-th coordinate is thei-th entry of the listl, or0iflhas fewer thani + 1entries line 82 sourceSource documentation
The vector in
ℤ^dwhosei-th coordinate is thei-th entry of the listl, or0iflhas fewer thani + 1entries. Used to encode the inputs of the reachability problem.standard axioms: propext what this means
Statement uses:
Nat,List,Int,FinProof uses:
List.getD,OfNat.ofNat2 instances, coercions and auxiliary constants left out.
def vecOfList (d : ℕ) (l : List ℤ) : Fin d → ℤ := fun i => l.getD i 0 …
- theorem
BranchingVAS.vecOfList_ofFnline 85 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Nat,Fin,Int,Eq, BranchingVAS.vecOfList,List.ofFnProof uses:
funext,of_eq_true,Eq.trans,True,congrFun',congrArg,List.getD,OfNat.ofNat,Option.getD,GetElem?.getElem?,List,LT.lt,List.length,Option.some,List.getD_eq_getElem?_getD,Option,GetElem.getElem,List.length_ofFn,getElem?_pos,List.getElem_ofFnand 1 more7 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
BranchingVAS.ofFn_vecOfListline 90 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Nat,List,Int,Eq,List.ofFn, BranchingVAS.vecOfList,List.map,List.getD,OfNat.ofNat,List.rangeProof uses:
Eq.mpr,Fin,List.finRange,id,congrArg,List.ofFn_eq_map,Eq.symm,List.map_coe_finRange_eq_range,Function.comp,List.map_map,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
BranchingVAS.primrec_ofFn_vecOfListline 96 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Primrec₂,Nat,List,Int,List.ofFn, BranchingVAS.vecOfListProof uses:
Primrec.of_eq,Prod,List.map,List.getD,Prod.snd,OfNat.ofNat,List.range,Prod.fst,Primrec.list_map,Primrec.comp,Primrec.list_range,Primrec.fst,Primrec₂.comp₂,Primrec.list_getD,Primrec.comp₂,Primrec.snd,Primrec₂.left,Primrec₂.right,Eq,Eq.symmand 1 more11 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- instance
BranchingVAS.(instance at line 106)line 106 sourceSource documentation
An input of the reachability problem, that is, a dimension
d, a branching vector addition system of dimensiondand a target vector inℤ^d, is encoded bydtogether with the lists of entries of the axioms, of the rules and of the target.instance : Primcodable (Σ d : ℕ, Bvas d × (Fin d → ℤ)) := …
Mentions: BranchingVAS.Bvas
- theorem
BranchingVAS.reachability_decidableThe reachability problem for branching vector addition systems is decidable sorry line 143 sourceSource documentation
The reachability problem for branching vector addition systems is decidable.
That is, the predicate taking a dimension
d, a branching vector addition systembof dimensiondand a target vectort ∈ ℤ^d, and returning whethertis reachable inb, is a computable predicate. Note that the dimension is part of the input: a single algorithm must work for all dimensions.As of August 2026, the solution is quite recently announced and is not yet peer-reviewed.
depends on sorry what this means
Statement uses:
ComputablePred,Sigma,Nat,Prod, BranchingVAS.Bvas,Fin,Int, BranchingVAS.Bvas.Reachable,Sigma.fst,Prod.fst,Sigma.snd,Prod.sndProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem reachability_decidable : ComputablePred fun p : Σ d : ℕ, Bvas d × (Fin d → ℤ) => p.2.1.Reachable p.2.2 := by …Mentions: BranchingVAS.Bvas
- theorem
BranchingVAS.reachable_of_mem_axiomsEvery axiom that is non-negative is reachable line 149 sourceSource documentation
Every axiom that is non-negative is reachable.
standard axioms: propext what this means
Statement uses:
Nat, BranchingVAS.Bvas,Fin,Int,Membership.mem,List,BranchingVAS.Bvas.axioms,LE.le,OfNat.ofNat, BranchingVAS.Bvas.ReachableProof uses:
BranchingVAS.Bvas.Reachable.base16 instances, coercions and auxiliary constants left out.
theorem reachable_of_mem_axioms {d : ℕ} (b : Bvas d) {v : Fin d → ℤ} (hmem : v ∈ b.axioms) (hcfg : 0 ≤ v) : b.Reachable v := …Mentions: BranchingVAS.Bvas
- theorem
BranchingVAS.reachable_imp_posReachable vectors are always non-negative line 155 sourceSource documentation
Reachable vectors are always non-negative.
standard axioms: propext what this means
Statement uses:
Nat,Fin,Int, BranchingVAS.Bvas, BranchingVAS.Bvas.Reachable,LE.le,OfNat.ofNatProof uses:
Eq,HEq,Membership.mem,List,BranchingVAS.Bvas.axioms,BranchingVAS.Bvas.Reachable.base,BranchingVAS.Bvas.unaryRules,HAdd.hAdd,BranchingVAS.Bvas.Reachable.unary,BranchingVAS.Bvas.binaryRules,BranchingVAS.Bvas.Reachable.binary,Eq.refl,HEq.refl20 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
theorem reachable_imp_pos {d : ℕ} (v : Fin d → ℤ) (b : Bvas d) : b.Reachable v → 0 ≤ v := by …Mentions: BranchingVAS.Bvas
- def
BranchingVAS.exampleBvasA small BVAS of dimension 3 used for a test below line 160 sourceSource documentation
A small BVAS of dimension 3 used for a test below.
standard axioms: propext what this means
Statement uses: BranchingVAS.Bvas,
OfNat.ofNat,NatProof uses:
BranchingVAS.Bvas.mk,List.cons,Fin,Int,Matrix.vecCons,Matrix.vecEmpty,List.nil,Neg.neg4 instances, coercions and auxiliary constants left out.
def exampleBvas : Bvas 3 := { …Mentions: BranchingVAS.Bvas
- def
BranchingVAS.exampleBvas2A small (indeed, degenerate, since it contains no binary rules) BVAS of dimension 2 used for a test below line 170 sourceSource documentation
A small (indeed, degenerate, since it contains no binary rules) BVAS of dimension 2 used for a test below.
standard axioms: propext what this means
Statement uses: BranchingVAS.Bvas,
OfNat.ofNat,NatProof uses:
BranchingVAS.Bvas.mk,List.cons,Fin,Int,Matrix.vecCons,Matrix.vecEmpty,List.nil,Neg.neg4 instances, coercions and auxiliary constants left out.
def exampleBvas2 : Bvas 2 := { …Mentions: BranchingVAS.Bvas
- theorem
BranchingVAS.reachable_exampleThe vector [0, 0, 12] is reachable in the first example BVAS line 180 sourceSource documentation
The vector [0, 0, 12] is reachable in the first example BVAS.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: BranchingVAS.Bvas.Reachable,
OfNat.ofNat,Nat, BranchingVAS.exampleBvas,Matrix.vecCons,Int,Matrix.vecEmptyProof uses:
BranchingVAS.Bvas.Reachable.base,of_decide_eq_true,Membership.mem,Fin,List,BranchingVAS.Bvas.axioms,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,List.Mem,List.finRange,HEq,Finset,Fintype.elems,Fintype.complete,LE.le,List.consand 19 more54 instances, coercions and auxiliary constants left out.
Tactic trace: 26 steps
Open to load the checked before-and-after goal states.
theorem reachable_example : exampleBvas.Reachable ![0,0,12] := …
- theorem
BranchingVAS.not_reachable_exampleThe vector [0, 0] is not reachable in the second example BVAS line 202 sourceSource documentation
The vector [0, 0] is not reachable in the second example BVAS.
standard axioms: propext what this means
Statement uses:
Not, BranchingVAS.Bvas.Reachable,OfNat.ofNat,Nat, BranchingVAS.exampleBvas2,Matrix.vecCons,Int,Matrix.vecEmptyProof uses:
False.elim,False,Eq.mp,Eq,HAdd.hAdd,Fin,Eq.trans,congrFun',congrArg,Matrix.cons_val_fin_one,Nat.succ,add_zero17 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
theorem not_reachable_example : ¬ exampleBvas2.Reachable ![0,0] := by …