Git Product home page Git Product logo

mathlogic2013's Introduction

Recurse functions

Task #6

Per-file description:

  • DataTypes.hs - declaration of type Nat, a bit strange implementation of Peano's natural numbers (it's really weird, but proper for the task we need them)
  • Primitives.hs - declaration of recurse function primitives
  • Basics.hs - declaration of some helpers, written in terms of recursive functions, we will use to construct the bigger ones
  • Functions.hs - implementation of task
  • Playground.hs - examples of usage

This code is assumed to be tested in ghci by loading Playground.hs. Template Haskell language extensions was actively used, writing the code. All usages are in way of implementing some function f :: Int -> Int -> Q Exp, which defines "code generator", that can be later being used by calling $(f n m). Code generators are used to provide type-correct functions with exact number of arguments (like e.g. U primitive: $(u 3 2) generates code for U_3^2)

Propositional Calculus

Tasks #1, #2, #3

Jar: https://dl.dropboxusercontent.com/u/3693476/PropositionalCalculus.jar

Simple proof check

java -jar PropositionalCalculus.jar -m pc -i tests_pc/1.in -o tests_pc/1.out

Deduction expand

Optional parametrs:

  • -i (input file, input.txt by default)
  • -o (output file, output.txt by default)
  • -n (expand last assumptions, 1 by default)
  • -na (expand all assumptions)
  • -math/-alt (alternate mode of printing, with characters ∧∨→¬)
  • -npc (Do not print comments)
  • -nr (Do not reduce unused expressions in proof, not recommended to use)
java -jar PropositionalCalculus.jar -m de -i tests_de/3.in -o tests_de/3.out

Proof find

Optional parametrs:

  • -i (input file, input.txt by default)
  • -o (output file, output.txt by default)
  • -math/-alt (alternate mode of printing, with characters ∧∨→¬)
  • -npc (Do not print comments)
  • -nr (Do not reduce unused expressions in proof, not recommended to use)
  • -pi (Print lengths of base proofs)
java -jar PropositionalCalculus.jar -m f -i tests_pf/6.in -o tests_pf/6.out

mathlogic2013's People

Contributors

georgeee avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.