Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: Course
Views: 50

A binary operation on AA is a function ff such that f:A×AAf:A \times A \rightarrow A.

typeset_mode(True, display=False) a,b,c,d, e, f = var('a b c d e f') def ex_1_d(tup1=(a, b), tup2=(c,d)): return (tup1[0]*tup2[1]+tup1[1]*tup2[0], tup1[1]*tup2[1]) LHS = ex_1_d((a,b), ex_1_d((b,c), (e,f))) print RHS == LHS show (RHS) show ("(", RHS[0].expand(),",", RHS[1].expand(), ")") show ("(", LHS[0].expand(),",", LHS[1].expand() , ")")
True
(bce+(b2+ac)f\displaystyle b c e + {\left(b^{2} + a c\right)} f, bcf\displaystyle b c f)
( bce+b2f+acf\displaystyle b c e + b^{2} f + a c f , bcf\displaystyle b c f )
( bce+b2f+acf\displaystyle b c e + b^{2} f + a c f , bcf\displaystyle b c f )
def ex_1_b(a,b): return a + b + a*b RHS = ex_1_b(ex_1_b(a,b),d) LHS = ex_1_b(a, ex_1_b(b, d)) (RHS-LHS).expand()
00
def ex_1_c(a,b): return (a+b)/5 RHS = ex_1_c(ex_1_b(a,b),c) LHS = ex_1_c(a, ex_1_b(b, c)) (RHS-LHS).expand()
15ab15bc\frac{1}{5} \, a b - \frac{1}{5} \, b c
def ex_1_d(a,b): return a/b RHS = ex_1_d(ex_1_d(a,b),d) LHS = ex_1_d(a, ex_1_d(b, d)) RHS == LHS
abd=adb\frac{a}{b d} = \frac{a d}{b}