Exercise algebra.equations.linear.balance
Description
Solve a linear equation using only balance rules.
Firsts
Rule algebra.equations.linear.balance.remove-div Location [] Term "Just (TCon relation1.eq [TCon arith1.plus [TVar \"x\",TNum 3],TCon arith1.times [TNum 10,TCon arith1.plus [TCon arith1.times [TCon arith1.divide [TNum 1,TNum 2],TVar \"x\"],TCon arith1.divide [TNum 3,TNum 2]]]])" Focus "Just (TCon relation1.eq [TCon arith1.plus [TVar \"x\",TNum 3],TCon arith1.times [TNum 10,TCon arith1.plus [TCon arith1.times [TCon arith1.divide [TNum 1,TNum 2],TVar \"x\"],TCon arith1.divide [TNum 3,TNum 2]]]])" Environment factor=2 Rule algebra.equations.linear.balance.distribute Location [] Term "Just (TCon relation1.eq [TCon arith1.plus [TCon arith1.times [TCon arith1.divide [TNum 1,TNum 2],TVar \"x\"],TCon arith1.divide [TNum 3,TNum 2]],TCon arith1.plus [TCon arith1.times [TCon arith1.divide [TNum 5,TNum 2],TVar \"x\"],TCon arith1.divide [TNum 15,TNum 2]]])" Focus "Just (TCon relation1.eq [TCon arith1.plus [TCon arith1.times [TCon arith1.divide [TNum 1,TNum 2],TVar \"x\"],TCon arith1.divide [TNum 3,TNum 2]],TCon arith1.plus [TCon arith1.times [TCon arith1.divide [TNum 5,TNum 2],TVar \"x\"],TCon arith1.divide [TNum 15,TNum 2]]])" Environment