#10963: More functorial constructions
-------------------------------------------------------------------------+--
Reporter: nthiery |
Owner: stumpc5
Type: enhancement |
Status: needs_work
Priority: major |
Milestone:
Component: categories |
Resolution:
Keywords: |
Work issues: Reduce startup time by 5%. Avoid "recursion depth exceeded
(ignored)". Trivial doctest fixes.
Report Upstream: N/A |
Reviewers: Simon King
Authors: Nicolas M. ThiƩry |
Merged in:
Dependencies: #11224, #8327, #10193, #12895, #14516, #14722, #13589 |
Stopgaps:
-------------------------------------------------------------------------+--
Comment (by SimonKing):
Hi Nicolas,
Replying to [comment:47 nthiery]:
> - C is a super category of A and B
> - {{{A.MyAxiom()}}} implies {{{A.MyOtherAxiom()}}}
> - {{{B.MyOtherAxiom()}}} is non trivial
I suppose you mean: C is a sub-category of A and B.
__What is an axiom?__
First of all, I wonder if we have the same understanding of "axiom". For
me, an axiom is defined in terms of an algebraic structure that is
provided by a certain category without this axiom. In particular
`A.Associative()` is actually not well-defined: One should in theory have
`A.MultiplicativeAssociative()`, where `MultiplicativeAssociative` is
provided by `Magmas()`, or `A.AdditiveAssociative()`, where
`AdditiveAssociative` is provided by `AdditiveMagmas()`.
Granted, if `A=Algebras(ZZ)`, then `A.Associative()` should be synonym of
`A.MultiplicativeAssociative()`. So, we might want to introduce reasonable
short-cuts in some cases.
__Your Example__
Now, in your example, if `MyAxiom` is defined for both A and B, then the
meet of A and B is a sub-category of a category M, for which `MyAxiom` and
`MyOtherAxiom` are defined. In your example, `MyAxiom` implies
`MyOtherAxiom` for A but not for B. Hence, A can be written as a sub-
category of `M.SpecialAxiom()`, and `SpecialAxiom` together with `MyAxiom`
implies `MyOtherAxiom`.
Now, you consider a category C defined by `C.__class__(data)`, which is a
common sub-category of A and B, and you wonder about the super-categories
of `C.MyAxiom()`.
Since A satisfies `SpecialAxiom`, C satisfies it as well. Hence, `D =
C.MyAxiom()`will also satisfy `MyOtherAxiom`. I guess the logic of this
implication is encoded in the way how `D.__class__._used_axioms` is
determined. Hence, `D.__class__._used_axioms` contains `SpecialAxiom`,
`MyAxiom` ''and'' `MyOtherAxiom`.
In a previous post, I presented an algorithm for determining
`D.super_categories()`. Let us study what it will return. Recall that it
returns `D._without_axiom(axiom)` for all axiom in
`D.__class__._used_axioms`, after removing duplicates. Hence:
- `axiom=SpecialAxiom`: We go along the mro of `D.__class__` until we find
something that does not have `SpecialAxiom`. This will be a certain super-
category X of C that is a sub-category of B (supposing that B does not
satisfy `SpecialAxiom`). This will result in
`X....MyAxiom().MySpecialAxiom()`, applying all axioms (except
`SpecialAxiom`) that hold for D but not for X.
- `axiom=MyAxiom`: This will yield `C.MyOtherAxiom()`.
- `axiom=MyOtherAxiom`: This will yield `C.MyAxiom()`, which coincides
with D and is thus removed as a duplicate.
Note that in this explanation I have modified my previous suggestion for
`D._without_axiom(this_axiom)`: We can not expect that
`D.__class__.__mro__` provides something that has ''the same'' axioms than
D, with just `this_axiom` omitted. But since applying axioms commutes, it
is fine to take ''the first'' class in `D.__class__.__mro__` that does not
have `this_axiom`, and then create a category from this class (with the
known input data of D), and apply all other missing axioms.
Anyway, I think that the above answer to `C.MyAxiom().super_categories()`
looks fine. Or what else would you like to have?
Cheers,
Simon
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10963#comment:50>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.