Added test for zero divisors for domains.
Merge 'aau/fsm/code-cleanup-post-16067' (trac #16557) into article-fsm-in-sage

* aau/fsm/code-cleanup-post-16067:
  trac #16580: use OrderedDict instead of dict to have non-random output
  FiniteStateMachine: rewritten code after #16067
  FiniteStateMachine._latex_: replaced inefficient code
  FiniteStateMachine: fix one more occurrence of raise E, ... (cf. #15990)
  FiniteStateMachine.deepcopy: additional doctest
added doctests from article Heuberger, Krenn and Kropf, Automata and Transducers in the Computer Algebra System Sage, :arxiv:`1404.7458`.
Trac 16744: use a different curve to prevent a random doctest failure
Merge branch 'develop' into ticket/16596
FiniteStateMachine.add_state: added link in docstring
finite_state_machine.full_group_by: 2 PEP 8 spacings
finite_state_machine: a few more hyperlinks in docstring
Added a note to _test_zero_divisors() for domains
removed full path for reference since not needed
Samall correction in toc
trac #16758: Add failing doctests
Updated Sage version to 6.3.rc0
trac #16758: Disallow composition with automaton
trac #16758: Use class of outer machine in composition

This requires introduction of a parameter new_class for empty_copy and for
product_FiniteStateMachine
Trac #16596: Add tests for the category of domains

Checking for zero divisors.

URL: http://trac.sagemath.org/16596
Reported by: tscrim
Ticket author(s): Travis Scrimshaw
Reviewer(s): Julian Rueth
Trac #16744: Random failure in elliptic_curves/constructor.py

The code is from #11474:
{{{
sage -t --long src/sage/schemes/elliptic_curves/constructor.py
**********************************************************************
File "src/sage/schemes/elliptic_curves/constructor.py", line 365, in sag
e.schemes.elliptic_curves.constructor.EllipticCurveFactory.create_key_an
d_extra_args
Failed example:
    E.gens()
Expected:
    [(-2 : 3 : 1), (1 : -1 : 1), (4 : -7 : 1)]
Got:
    [(-2 : 3 : 1), (-7/4 : 25/8 : 1), (1 : -1 : 1)]
**********************************************************************
File "src/sage/schemes/elliptic_curves/constructor.py", line 368, in sag
e.schemes.elliptic_curves.constructor.EllipticCurveFactory.create_key_an
d_extra_args
Failed example:
    E.gens()
Expected:
    [(-2 : 3 : 1), (1 : -1 : 1), (4 : -7 : 1)]
Got:
    [(-2 : 3 : 1), (-7/4 : 25/8 : 1), (1 : -1 : 1)]
**********************************************************************
1 item had failures:
   2 of  19 in sage.schemes.elliptic_curves.constructor.EllipticCurveFac
tory.create_key_and_extra_args
    [182 tests, 2 failures, 67.70 s]
}}}

URL: http://trac.sagemath.org/16744
Reported by: vbraun
Ticket author(s): Peter Bruin
Reviewer(s): Jeroen Demeyer
Trac #16705: including doctests of arxiv`1404.7458` in src/sage/tests

Doctests from article Heuberger, Krenn and Kropf, Automata and
Transducers in the Computer Algebra System Sage, :arxiv:`1404.7458`
should be included in src/sage/tests.

URL: http://trac.sagemath.org/16705
Reported by: dkrenn
Ticket author(s): Clemens Heuberger, Daniel Krenn, Sara Kropf
Reviewer(s): Clemens Heuberger, Daniel Krenn, Sara Kropf
Trac #16754: Finite State Machine: trivial documentation improvements

Corrected two PEP 8 issues and a typo in documentation; added a few
internal hyperlinks.

URL: http://trac.sagemath.org/16754
Reported by: cheuberg
Ticket author(s): Clemens Heuberger
Reviewer(s): Daniel Krenn, Sara Kropf
Trac #16758: FiniteStateMachine.composition: check types

The output of an automaton should not be feedable into a transducer
(because there is none); when composing an automaton with a transducer,
the result should be an automaton.

The aim would be:

{{{
sage: from sage.combinat.finite_state_machine import (
....:     is_Automaton, is_Transducer)
sage: T = Transducer([(0, 0, 0, 0)], initial_states=[0])
sage: A = Automaton([(0, 0, 0)], initial_states=[0])
sage: T.composition(A, algorithm='direct')
Traceback (most recent call last):
...
TypeError: Composition with automaton is not possible.
sage: T.composition(A, algorithm='explorative')
Traceback (most recent call last):
...
TypeError: Composition with automaton is not possible.
sage: A.composition(A, algorithm='direct')
Traceback (most recent call last):
...
TypeError: Composition with automaton is not possible.
sage: A.composition(A, algorithm='explorative')
Traceback (most recent call last):
...
TypeError: Composition with automaton is not possible.
sage: is_Automaton(A.composition(T, algorithm='direct'))
True
sage: is_Automaton(A.composition(T, algorithm='explorative'))
True
}}}

This is now achieved by this patch.

URL: http://trac.sagemath.org/16758
Reported by: cheuberg
Ticket author(s): Clemens Heuberger
Reviewer(s): Daniel Krenn