<commit_before>module Main(module Prelude, (^), (&&), (||)) where

import qualified Prelude as P
import Prelude hiding ((^), (&&), (||))

data Logic = Atom String | Neg Logic | Or Logic Logic | And Logic Logic
instance Show Logic where
  show x = case x of
    Atom a  -> a
    Neg p   -> "￢" ++ show p
    Or  p q -> show p ++ " ∨ " ++ show q
    And p q -> show p ++ " ∧ " ++ show q

p = Atom "p"
q = Atom "q"

(^) :: Logic -> Logic
(^) p = Neg p

(||) :: Logic -> Logic -> Logic
(||) p q = p `Or` q

(&&) :: Logic -> Logic -> Logic
(&&) p q = p `And` q

(==>) :: Logic -> Logic -> Logic
(==>) p q = (Neg p) `Or`  q

(<=>) :: Logic -> Logic -> Logic
(<=>) p q = ((Neg p) `Or` q) `And` (p `Or` (Neg q))
<commit_msg>Init r logic<commit_after>module Main(module Prelude, (^), (&&), (||)) where

import qualified Prelude as P
import Prelude hiding ((^), (&&), (||))

data Logic = Atom String | Neg Logic | Or Logic Logic | And Logic Logic
instance Show Logic where
  show x = case x of
    Atom a  -> a
    Neg p   -> "￢" ++ show p
    Or  p q -> "("++ show p ++ " ∨ " ++ show q ++ ")"
    And p q -> "("++ show p ++ " ∧ " ++ show q ++ ")"

p = Atom "p" :: Logic
q = Atom "q" :: Logic
r = Atom "r" :: Logic

(^) :: Logic -> Logic
(^) p = Neg p

(||) :: Logic -> Logic -> Logic
(||) p q = p `Or` q

(&&) :: Logic -> Logic -> Logic
(&&) p q = p `And` q

(==>) :: Logic -> Logic -> Logic
(==>) p q = (Neg p) `Or`  q

(<=>) :: Logic -> Logic -> Logic
(<=>) p q = ((Neg p) `Or` q) `And` (p `Or` (Neg q))
{'fraction_non_alphanumeric': 0.24532085561497327, 'fraction_numerical': 0.0, 'mean_word_length': 2.4813953488372094, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2569306', 'n_tokens_mistral': 653, 'n_tokens_neox': 587, 'n_words': 222}