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 Expr of degree degree_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 from Q through that hook; when Q’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 raises ValueError. The derived bracket’s own degree is degree_Q + 2·k_base with k_base the base’s degree in its own grading (operand_shift; −1 for SN), and −1 in acting_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 Derivation that lifts operands into the domain of the base bracket. The canonical use is the Koszul bracket on 1-forms: with base=sn, Q=π, and acting_on=π^♯ (an Anchor or musical Sharp), expand() emits the classical Koszul formula L_{ρ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_on is set. Default to the smooth-manifold singletons.

  • lie_derivative (Optional[LieDerivativeFactory]) – Cartan operators used only when acting_on is set. Default to the smooth-manifold singletons.

__init__(base, Q, *, degree_Q=None, name=None, acting_on=None, d=None, lie_derivative=None)
Parameters:
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)} with s = operand_degree().

expand(a, b[, registry])

{a, b}_Q = [[a, Q]_base, b]_base (generic) or the anchor-lifted Koszul formula when acting_on is set.

expand_definition(a, b[, registry])

Return [[a, Q]_base, b]_base before base-expansion.

generator_degree([registry])

|Q| in the base grading, VALIDATED against the registry: the degree the base's grading_degree() determines for Q under registry wins; a declared degree_Q that contradicts a determinable degree raises ValueError; 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 of module_product()).

jacobi_condition([registry])

Return the VanishingCondition controlling Jacobi.

jacobi_obstruction([registry])

Return [Q, Q]_base, the expression whose vanishing is the remaining hypothesis for the derived bracket's Jacobi.

jacobi_obstruction_raw()

Return the unexpanded [Q, Q]_base BracketApply node, 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 BIVECTOR Q on 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|} of b·[a, c] in the Leibniz claim [a, b·c] = [a, b]·c + (−1)^{s(a)|b|} b·[a, c]: ad_a has degree s(a) = |a| + k and passes b of UNSHIFTED degree |b|.

module_product(b, c)

The product the Leibniz axiom distributes over (default: Product).

operand_degree(x[, registry])

s(x) = |x| + k with the derived shift k = |Q| + 2·k_base taken from the registry-validated generator_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

Q

acting_on

base

degree

degree_Q

is_graded_antisymmetric

name

operand_shift

the bracket's degree there (default: degree; for SN it is −1 in the multivector grading although degree is recorded in the already-shifted convention).

satisfies_graded_jacobi

True / False / None (conditional).

satisfies_leibniz

grading_degree(x, registry=None)

|x| — the operand’s degree in the module’s own grading (the grading of module_product()). Default: the operator grading degree_of(). Raises ValueError when the degree is undeterminable.

Parameters:
Return type:

Degree

generator_degree(registry=None)

|Q| in the base grading, VALIDATED against the registry: the degree the base’s grading_degree() determines for Q under registry wins; a declared degree_Q that contradicts a determinable degree raises ValueError; 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| + k with the derived shift k = |Q| + 2·k_base taken from the registry-validated generator_degree() (−1 in Koszul mode) — the ONE sign source of every claimed skew / Jacobi / Leibniz sign of this bracket.

Parameters:
Return type:

Degree

koszul_well_typed(a, b, registry=None)

Koszul (acting_on) mode is the bracket of a BIVECTOR Q on 1-FORMS: the anchor lift ρ(a) is a vector field and ⟨b, ρ(a)⟩ a pairing of a 1-form with it. True only when the registry-validated generator degree is 2 and both operands are certified 1-forms by the one type source (kind_of()); anything else is ill-typed (default-reject).

Parameters:
Return type:

bool

module_product(b, c)

The product the Leibniz axiom distributes over (default: Product).

Parameters:
Return type:

Expr

expand(a, b, registry=None)

{a, b}_Q = [[a, Q]_base, b]_base (generic) or the anchor-lifted Koszul formula when acting_on is set.

With acting_on=ρ: {a, b}_{Q, ρ} = L_{ρa} b − L_{ρb} a − d⟨ρa, b⟩, matching KoszulBracket(ρ), the structural equality is the content of the classical/derived equivalence theorem on Poisson manifolds.

Parameters:
Return type:

Expr

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:
Return type:

Expr

expand_definition(a, b, registry=None)

Return [[a, Q]_base, b]_base before base-expansion.

Useful for proofs that want to show the derived definition literally, without collapsing the inner base-bracket nodes. The result is a BracketApply of the base bracket applied to a base-bracket node.

Parameters:
Return type:

Expr

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:

Expr

jacobi_obstruction_raw()

Return the unexpanded [Q, Q]_base BracketApply node, leaving the base-bracket shape intact for display or further pattern matching.

Return type:

BracketApply

jacobi_condition(registry=None)

Return the VanishingCondition controlling Jacobi.

The returned condition wraps [Q, Q]_base (expanded by the base bracket via jacobi_obstruction()) together with a display name tied to this derived bracket. The proof layer’s DerivedBracketStrategy consumes 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:

VanishingCondition