The De Morgan basis extended by XOR and EQUIV gates #
This file defines the circuit basis of Extended.signature: the De Morgan operations (Boolean
constants, identity, NOT, binary AND and OR) together with binary XOR and EQUIV gates, its
standard interpretation Extended.interpretation, and three cost models: Extended.deMorganCost
counts the AND and OR gates, Extended.xorCost the XOR and EQUIV gates, and
Extended.binaryCost all binary gates.
It also defines the four-leaf De Morgan formulas Formula.xorGadget z₁ z₂ and
Formula.equivGadget z₁ z₂ computing z₁ ⊕ z₂ and z₁ ↔ z₂. When both variables are shared
values (indices at least m), the gadgets have no input leaves below m; this is what lets an
XOR or EQUIV gate of any fan-out be charged only two shared values in the Khrapchenko bound of
Complexitylib.Algebraic.LowerBound.KarchmerWigderson.Sharing.Extended.
XOR and EQUIV gadgets #
The De Morgan formula (z₁ ∧ ¬z₂) ∨ (¬z₁ ∧ z₂) computing z₁ ⊕ z₂ on two variables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The De Morgan formula (z₁ ∧ z₂) ∨ (¬z₁ ∧ ¬z₂) computing z₁ ↔ z₂ on two variables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
When both variables z₁, z₂ are shared variables (≥ m), equivGadget z₁ z₂ contributes zero
input leaves below m.
The extended basis #
Equations
- One or more equations did not get rendered due to their size.
Arity of an operation in the extended basis.
Equations
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.false = 0
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.true = 0
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.id = 1
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.not = 1
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.and = 2
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.or = 2
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.xor = 2
- Algebraic.KW.Extended.arity Algebraic.KW.Extended.Op.equiv = 2
Instances For
Signature of the extended De Morgan + XOR/EQUIV basis.
Equations
Instances For
Standard Boolean interpretation of the extended basis.
Equations
- One or more equations did not get rendered due to their size.
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.false x_2 = false
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.true x_2 = true
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.id input = input ⟨0, Algebraic.KW.Extended.interpretation._proof_3⟩
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.not input = !input ⟨0, Algebraic.KW.Extended.interpretation._proof_4⟩
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.and input = (input ⟨0, Algebraic.KW.Extended.interpretation._proof_5⟩ && input ⟨1, Algebraic.KW.Extended.interpretation._proof_6⟩)
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.or input = (input ⟨0, Algebraic.KW.Extended.interpretation._proof_7⟩ || input ⟨1, Algebraic.KW.Extended.interpretation._proof_8⟩)
- Algebraic.KW.Extended.interpretation Algebraic.KW.Extended.Op.xor input = (input ⟨0, Algebraic.KW.Extended.interpretation._proof_9⟩ ^^ input ⟨1, Algebraic.KW.Extended.interpretation._proof_10⟩)
Instances For
Cost model charging 1 for binary De Morgan gates (and, or) and 0 for all other gates.
Equations
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.and = 1
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.or = 1
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.false = 0
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.true = 0
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.id = 0
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.not = 0
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.xor = 0
- Algebraic.KW.Extended.deMorganCost Algebraic.KW.Extended.Op.equiv = 0
Instances For
Cost model charging 1 for binary XOR/EQUIV gates (xor, equiv) and 0 for all other gates.
Equations
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.xor = 1
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.equiv = 1
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.false = 0
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.true = 0
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.id = 0
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.not = 0
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.and = 0
- Algebraic.KW.Extended.xorCost Algebraic.KW.Extended.Op.or = 0
Instances For
Cost model charging 1 for all binary gates (and, or, xor, equiv).
Equations
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.and = 1
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.or = 1
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.xor = 1
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.equiv = 1
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.false = 0
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.true = 0
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.id = 0
- Algebraic.KW.Extended.binaryCost Algebraic.KW.Extended.Op.not = 0
Instances For
Whether an operation is in the De Morgan fragment (false, true, id, not, and, or).
Equations
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.false = true
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.true = true
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.id = true
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.not = true
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.and = true
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.or = true
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.xor = false
- Algebraic.KW.Extended.isDeMorgan Algebraic.KW.Extended.Op.equiv = false