jacopy.brackets.DerivedBracket¶
- class jacopy.brackets.DerivedBracket(base, Q, *, degree_Q=None, name=None, acting_on=None, d=None, lie_derivative=None)¶
Bases:
GradedBracket{a, b}_Q := [[a, Q]_base, b]_base.- Parameters:
base (GradedBracket) – The underlying graded bracket.
Q (Expr) – The generator, an
Exprof degreedegree_Q.degree_Q (Optional[DegreeLike]) – The generator’s degree, measured in the BASE bracket’s grading (
grading_degree(): multivector degree for SN, so|π| = 2). When omitted it is DERIVED fromQthrough that hook; whenQ’s degree is not determinable without a registry it stays SYMBOLIC (|Q|), never a silent 0, so parity checks refuse. An explicit value contradicting a determinable degree raisesValueError. The derived bracket’s own degree isdegree_Q + 2·k_basewithk_basethe base’s degree in its own grading (operand_shift; −1 for SN), and −1 inacting_on(Koszul) mode.name (Optional[str]) – Optional display name. Defaults to a structured tag derived from the base bracket and generator.
acting_on (Optional[Derivation]) – Optional
Derivationthat lifts operands into the domain of the base bracket. The canonical use is the Koszul bracket on 1-forms: withbase=sn,Q=π, andacting_on=π^♯(anAnchoror musicalSharp),expand()emits the classical Koszul formulaL_{ρa} b − L_{ρb} a − d⟨ρa, b⟩rather than the literal[[a, Q]_base, b]_base. The literal form is unreachable when operands are 1-forms and the base bracket (SN) takes multivectors, the anchor bridges the two bundles.d (Optional[Derivation]) – Cartan operators used only when
acting_onis set. Default to the smooth-manifold singletons.lie_derivative (Optional[LieDerivativeFactory]) – Cartan operators used only when
acting_onis set. Default to the smooth-manifold singletons.
- __init__(base, Q, *, degree_Q=None, name=None, acting_on=None, d=None, lie_derivative=None)¶
- Parameters:
base (GradedBracket)
Q (Expr)
degree_Q (int | Degree | None)
name (str | None)
acting_on (Derivation | None)
d (Derivation | None)
lie_derivative (Callable[[Expr], Derivation] | None)
- Return type:
None
Methods
__init__(base, Q, *[, degree_Q, name, ...])claimed_swap_sign(a, b[, registry])εin the graded-antisymmetry CLAIM[a, b] = ε·[b, a]:ε = −(−1)^{s(a)s(b)}withs=operand_degree().expand(a, b[, registry]){a, b}_Q = [[a, Q]_base, b]_base(generic) or the anchor-lifted Koszul formula whenacting_onis set.expand_definition(a, b[, registry])Return
[[a, Q]_base, b]_basebefore base-expansion.generator_degree([registry])|Q|in the base grading, VALIDATED against the registry: the degree the base'sgrading_degree()determines forQunderregistrywins; a declareddegree_Qthat contradicts a determinable degree raisesValueError; when the registry cannot determine it the declared value (possibly symbolic) stands.graded_antisymmetry_obstruction(a, b[, registry])[a, b] + (−1)^{s(a)s(b)} [b, a](= [a, b] − ε[b, a]withε=claimed_swap_sign()).graded_jacobi_obstruction(a, b, c[, registry])Cyclic Jacobi with Koszul signs in the shifted convention:
grading_degree(x[, registry])|x|— the operand's degree in the module's own grading (the grading ofmodule_product()).jacobi_condition([registry])Return the
VanishingConditioncontrolling Jacobi.jacobi_obstruction([registry])Return
[Q, Q]_base, the expression whose vanishing is the remaining hypothesis for the derived bracket's Jacobi.Return the unexpanded
[Q, Q]_baseBracketApplynode, leaving the base-bracket shape intact for display or further pattern matching.jacobi_term_sign(A, B, C[, registry])Sign
(−1)^{s(A)s(C)}of the[A, [B, C]]summand in the cyclic graded JacobiΣ_cyc (−1)^{s(A)s(C)} [A, [B, C]] = 0(s=operand_degree()).koszul_well_typed(a, b[, registry])Koszul (
acting_on) mode is the bracket of a BIVECTORQon 1-FORMS: the anchor liftρ(a)is a vector field and⟨b, ρ(a)⟩a pairing of a 1-form with it.leibniz_obstruction(a, b, c[, registry])As the base class — except in Koszul (
acting_on) mode, where[a, b∧c]has a 2-form in its second slot and the anchor-lifted formula is defined on 1-forms only: the obstruction is ill-typed and REFUSED (ValueError), never built with an undefined pairing.leibniz_term_sign(a, b[, registry])Sign
(−1)^{s(a)|b|}ofb·[a, c]in the Leibniz claim[a, b·c] = [a, b]·c + (−1)^{s(a)|b|} b·[a, c]:ad_ahas degrees(a) = |a| + kand passesbof UNSHIFTED degree|b|.module_product(b, c)The product the Leibniz axiom distributes over (default:
Product).operand_degree(x[, registry])s(x) = |x| + kwith the derived shiftk = |Q| + 2·k_basetaken from the registry-validatedgenerator_degree()(−1 in Koszul mode) — the ONE sign source of every claimed skew / Jacobi / Leibniz sign of this bracket.pair_swap_sign(a, b[, registry])Sign
εsuch that[a, b] = ε·[b, a]HOLDS — a rewrite licence:claimed_swap_sign()for a bracket asserted graded antisymmetric,None(decline: do not rewrite) for any other bracket, a symbolic parity OR an undeterminable operand degree (a licence never raises — an unknown degree means no rule fires, no closure).Attributes
Qacting_onbasedegreedegree_Qis_graded_antisymmetricnameoperand_shiftthe bracket's degree there (default:
degree; for SN it is−1in the multivector grading althoughdegreeis recorded in the already-shifted convention).satisfies_graded_jacobiTrue / False / None (conditional).
satisfies_leibniz- grading_degree(x, registry=None)¶
|x|— the operand’s degree in the module’s own grading (the grading ofmodule_product()). Default: the operator gradingdegree_of(). RaisesValueErrorwhen the degree is undeterminable.- Parameters:
x (Expr)
registry (PropertyRegistry | None)
- Return type:
Degree
- generator_degree(registry=None)¶
|Q|in the base grading, VALIDATED against the registry: the degree the base’sgrading_degree()determines forQunderregistrywins; a declareddegree_Qthat contradicts a determinable degree raisesValueError; when the registry cannot determine it the declared value (possibly symbolic) stands.- Parameters:
registry (PropertyRegistry | None)
- Return type:
Degree
- operand_degree(x, registry=None)¶
s(x) = |x| + kwith the derived shiftk = |Q| + 2·k_basetaken from the registry-validatedgenerator_degree()(−1 in Koszul mode) — the ONE sign source of every claimed skew / Jacobi / Leibniz sign of this bracket.- Parameters:
x (Expr)
registry (PropertyRegistry | None)
- Return type:
Degree
- koszul_well_typed(a, b, registry=None)¶
Koszul (
acting_on) mode is the bracket of a BIVECTORQon 1-FORMS: the anchor liftρ(a)is a vector field and⟨b, ρ(a)⟩a pairing of a 1-form with it.Trueonly when the registry-validated generator degree is2and both operands are certified 1-forms by the one type source (kind_of()); anything else is ill-typed (default-reject).- Parameters:
a (Expr)
b (Expr)
registry (PropertyRegistry | None)
- Return type:
- module_product(b, c)¶
The product the Leibniz axiom distributes over (default:
Product).
- expand(a, b, registry=None)¶
{a, b}_Q = [[a, Q]_base, b]_base(generic) or the anchor-lifted Koszul formula whenacting_onis set.With
acting_on=ρ:{a, b}_{Q, ρ} = L_{ρa} b − L_{ρb} a − d⟨ρa, b⟩, matchingKoszulBracket(ρ), the structural equality is the content of the classical/derived equivalence theorem on Poisson manifolds.- Parameters:
a (Expr)
b (Expr)
registry (PropertyRegistry | None)
- Return type:
- leibniz_obstruction(a, b, c, registry=None)¶
As the base class — except in Koszul (
acting_on) mode, where[a, b∧c]has a 2-form in its second slot and the anchor-lifted formula is defined on 1-forms only: the obstruction is ill-typed and REFUSED (ValueError), never built with an undefined pairing.- Parameters:
a (Expr)
b (Expr)
c (Expr)
registry (PropertyRegistry | None)
- Return type:
- expand_definition(a, b, registry=None)¶
Return
[[a, Q]_base, b]_basebefore base-expansion.Useful for proofs that want to show the derived definition literally, without collapsing the inner base-bracket nodes. The result is a
BracketApplyof the base bracket applied to a base-bracket node.- Parameters:
a (Expr)
b (Expr)
registry (PropertyRegistry | None)
- Return type:
- jacobi_obstruction(registry=None)¶
Return
[Q, Q]_base, the expression whose vanishing is the remaining hypothesis for the derived bracket’s Jacobi.Under the Derived Bracket Theorem’s PRECONDITIONS (graded-Lie base, odd shifted generator — and per-slot skewness for the cyclic Lie form, checked by the proof layer) the vanishing of this single expression yields Jacobi; without them it claims nothing.
- Parameters:
registry (PropertyRegistry | None)
- Return type:
- jacobi_obstruction_raw()¶
Return the unexpanded
[Q, Q]_baseBracketApplynode, leaving the base-bracket shape intact for display or further pattern matching.- Return type:
- jacobi_condition(registry=None)¶
Return the
VanishingConditioncontrolling Jacobi.The returned condition wraps
[Q, Q]_base(expanded by the base bracket viajacobi_obstruction()) together with a display name tied to this derived bracket. The proof layer’sDerivedBracketStrategyconsumes exactly this shape when it discharges Jacobi: one theorem step reduces triple-cyclic Jacobi to the condition’s vanishing, then simplifies.- Parameters:
registry (PropertyRegistry | None)
- Return type: