Discussion:
[fricas-devel] Buggy looking output form of a Type
Riccardo GUIDA
2018-08-01 15:43:44 UTC
Permalink
... unevaluated concat's in (3). Riccardo

(1) -> gametes:=['AB,'Ab,'aB,'ab]

(1) [AB, Ab, aB, ab]
Type: List(OrderedVariableList([AB,Ab,aB,ab]))
(2) -> segregationRates : List SquareMatrix(4,FRAC INT) := [matrix [ [1, 1/2, 1/2, 9/20], [1/2, 0, 1/20, 0], [1/2, 1/20, 0, 0], [9/20, 0, 0, 0] ], matrix [ [0, 1/2, 0, 1/20], [1/2, 1, 9/20, 1/2], [0, 9/20, 0, 0], [1/20, 1/2, 0, 0] ], matrix [ [0, 0, 1/2, 1/20], [0, 0, 9/20, 0], [1/2, 9/20, 1, 1/2], [1/20, 0, 1/2, 0] ], matrix [ [0, 0, 0, 9/segregationRates : List SquareMatrix(4,FRAC INT) := [matrix [ [1, 1/2, 1/2, 9/20], [1/2, 0, 1/20, 0], [1/2, 1/20, 0, 0], [9/20, 0, 0, 0] ], matrix [ [0, 1/2, 0, 1/20], [1/2, 1, 9/20, 1/2], [0, 9/20, 0, 0], [1/20, 1/2, 0, 0] ], matrix [ [0, 0, 1/2, 1/20], [0, 0, 9/20, 0], [1/2, 9/20, 1, 1/2], [1/20, 0, 1/2, 0] ], matrix [ [0, 0, 0, 9/20], [0, 0, 1/20, 1/2], [0, 1/20, 0, 1/2], [9/20, 1/2, 1/2, 1] ] ]

(2)
┌ 1 1 9┐ ┌ 1 1┐ ┌ 1 1┐ ┌ 9┐
│1 ─ ─ ──│ │0 ─ 0 ──│ │0 0 ─ ──│ │0 0 0 ──│
│ 2 2 20│ │ 2 20│ │ 2 20│ │ 20│
│ │ │ │ │ │ │ │
│1 1 │ │1 9 1 │ │ 9 │ │ 1 1 │
│─ 0 ── 0 │ │─ 1 ── ─ │ │0 0 ── 0 │ │0 0 ── ─ │
│2 20 │ │2 20 2 │ │ 20 │ │ 20 2 │
[│ │, │ │, │ │, │ │]
│1 1 │ │ 9 │ │1 9 1 │ │ 1 1 │
│─ ── 0 0 │ │0 ── 0 0 │ │─ ── 1 ─ │ │0 ── 0 ─ │
│2 20 │ │ 20 │ │2 20 2 │ │ 20 2 │
│ │ │ │ │ │ │ │
│ 9 │ │ 1 1 │ │ 1 1 │ │ 9 1 1 │
│── 0 0 0 │ │── ─ 0 0 │ │── 0 ─ 0 │ │── ─ ─ 1 │
└20 ┘ └20 2 ┘ └20 2 ┘ └20 2 2 ┘
Type: List(SquareMatrix(4,Fraction(Integer)))
(3) -> x : ALGSC(DECIMAL, 4, gametes, segregationRates) := convert [3/10, 1/5, 1/10, 2/5]

(3) 0.4ab + 0.1aB + 0.2Ab + 0.3AB
Type: AlgebraGivenByStructuralConstants(DecimalExpansion,4,[AB,Ab,aB,ab],[[[1,CONCAT(0,.,5),CONCAT(0,.,5),CONCAT(0,.,CONCAT(4,5))],[CONCAT(0,.,5),0,CONCAT(0,.,CONCAT(0,5)),0],[CONCAT(0,.,5),CONCAT(0,.,CONCAT(0,5)),0,0],[CONCAT(0,.,CONCAT(4,5)),0,0,0]],[[0,CONCAT(0,.,5),0,CONCAT(0,.,CONCAT(0,5))],[CONCAT(0,.,5),1,CONCAT(0,.,CONCAT(4,5)),CONCAT(0,.,5)],[0,CONCAT(0,.,CONCAT(4,5)),0,0],[CONCAT(0,.,CONCAT(0,5)),CONCAT(0,.,5),0,0]],[[0,0,CONCAT(0,.,5),CONCAT(0,.,CONCAT(0,5))],[0,0,CONCAT(0,.,CONCAT(4,5)),0],[CONCAT(0,.,5),CONCAT(0,.,CONCAT(4,5)),1,CONCAT(0,.,5)],[CONCAT(0,.,CONCAT(0,5)),0,CONCAT(0,.,5),0]],[[0,0,0,CONCAT(0,.,CONCAT(4,5))],[0,0,CONCAT(0,.,CONCAT(0,5)),CONCAT(0,.,5)],[0,CONCAT(0,.,CONCAT(0,5)),0,CONCAT(0,.,5)],[CONCAT(0,.,CONCAT(4,5)),CONCAT(0,.,5),CONCAT(0,.,5),1]]])

(4) -> z : ALGSC(Fraction Integer, 4, gametes, segregationRates) := convert [3/10, 1/5, 1/10, 2/5]

2 1 1 3
(4) ─ ab + ── aB + ─ Ab + ── AB
5 10 5 10
Type: AlgebraGivenByStructuralConstants(Fraction(Integer),4,[AB,Ab,aB,ab],[[[1,1/2,1/2,9/20],[1/2,0,1/20,0],[1/2,1/20,0,0],[9/20,0,0,0]],[[0,1/2,0,1/20],[1/2,1,9/20,1/2],[0,9/20,0,0],[1/20,1/2,0,0]],[[0,0,1/2,1/20],[0,0,9/20,0],[1/2,9/20,1,1/2],[1/20,0,1/2,0]],[[0,0,0,9/20],[0,0,1/20,1/2],[0,1/20,0,1/2],[9/20,1/2,1/2,1]]])
(5) ->
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...