Nets, linearity and equivalence up to wires #
Net S ν— a multiset of unordered equations between trees. An equationt = uplugs the root oftinto the root ofu.Net.Linear— every name occurs at most twice. A name occurring twice is an internal wire; a name occurring once is a free port.Wire,Equiv— two nets are the same graph when they differ by wire substitution: an equationx = twhosexhas its other end elsewhere is the same as pluggingtthere. Interactions are not part of this equivalence. Renaming an internal wire is a special case.
Contents, in the order of the file:
- Nets, their names and their cells:
Net,eqVars,eqCells,Net.cells,Net.vars,Net.bind,Net.vars_bind. - Linearity and bounds on names:
Net.Linear,Net.Below,Term.Below, thebelow_lemmas,Net.Linear.add_fresh. - Wire substitution and equivalence:
Wire,Equiv. - One wire substitution:
Wire.count_vars,Wire.free_iff,Wire.cells_eq,Wire.linear_right,Wire.add_right,Wire.below. - Equivalence:
Equiv.refl,Equiv.symm,Equiv.trans,Equiv.linear_iff,Equiv.free_iff,Equiv.cells_eq.
The cells of a net: the symbols occurring in it, with multiplicity.
Equations
Instances For
The names of a net, with multiplicity.
Equations
Instances For
Plug a tree into every name of the net.
Equations
- INet.Net.bind f N = Multiset.map (Sym2.map (INet.Term.bind f)) N
Instances For
Every name occurs at most twice: once at each end of a wire, or once for a free port.
Equations
- N.Linear = ∀ (x : ν), Multiset.count x N.vars ≤ 2
Instances For
The empty net is below every bound.
Linearity carried along an equality of nets.
One wire substitution. The wire x has one end on the root of t and its other end inside
the equation a = b; plugging t there gives the same graph. Linearity of the net guarantees
that x occurs nowhere else.
- mk {S : Signature} {ν : Type} [DecidableEq ν] (x : ν) (t a b : Term S ν) (Δ : Net S ν) (hlin : Net.Linear (s(Term.var x, t) ::ₘ s(a, b) ::ₘ Δ)) (hx : x ∈ a.vars + b.vars) : Wire (s(Term.var x, t) ::ₘ s(a, b) ::ₘ Δ) (s(a.subst x t, b.subst x t) ::ₘ Δ)
Instances For
Nets that are the same graph, spelled differently.
Equations
Instances For
The net a wire substitution starts from is linear.
A wire substitution removes both ends of the wire and changes no other name.
A wire substitution does not change which names are free ports.
A wire substitution creates and destroys no cell.
The net a wire substitution arrives at is linear.
The two nets of a wire substitution are equivalent.
A wire substitution carried along equalities of nets.
A net is equivalent to itself.
Equal nets are equivalent.
Equivalence is symmetric.
Equivalence is transitive.
Equivalent nets are linear together.
A net equivalent to a linear net is linear.
Equivalent nets have the same free ports.
Equivalent nets have the same cells: the equivalence performs no interaction.