{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#Heading 1\n", "## Heading 2\n", "### Heading 3\n", "#### Heading 4\n", "##### Heading 5 in Burnt Orange" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#####Font\n", "The only effective way to raise the confidence level of a program significantly is to give a convincing proof of its correctness. But one should not first make the program and then prove its correctness, because then the requirement of providing the proof would only increase the poor programmer\u2019s burden. On the contrary: the programmer should let correctness proof and program grow hand in hand." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#####Timmy" ] }, { "cell_type": "code", "collapsed": false, "input": [ "exec( open(\"timmy.py\").read() )" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "#####Sympy + Latex" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from sympy import init_printing, Matrix, MatMul, latex\n", "from IPython.display import Math\n", "init_printing()" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "P = Matrix([[0, 1, 0],\\\n", " [1, 0, 0],\\\n", " [0, 0, 1]])\n", "\n", "A = Matrix([[0, 4, -2],\\\n", " [4, 8, 6],\\\n", " [6, -4, 2]])\n", "\n", "new = P * A\n", "\n", "Math( \"$$\" + latex( MatMul( P, A ), mat_str = \"array\" ) + \"=\" + latex( new, mat_str = \"array\" ) + \"$$\" )" ], "language": "python", "metadata": {}, "outputs": [ { "latex": [ "$$\\left[\\begin{array}{ccc}0 & 1 & 0\\\\1 & 0 & 0\\\\0 & 0 & 1\\end{array}\\right] \\left[\\begin{array}{ccc}0 & 4 & -2\\\\4 & 8 & 6\\\\6 & -4 & 2\\end{array}\\right]=\\left[\\begin{array}{ccc}4 & 8 & 6\\\\0 & 4 & -2\\\\6 & -4 & 2\\end{array}\\right]$$" ], "metadata": {}, "output_type": "pyout", "prompt_number": 3, "text": [ "" ] } ], "prompt_number": 3 } ], "metadata": {} } ] }