Equations
- CCG.instReprAtom = { reprPrec := CCG.instReprAtom.repr }
Equations
- CCG.instReprAtom.repr CCG.Atom.S prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CCG.Atom.S")).group prec✝
- CCG.instReprAtom.repr CCG.Atom.NP prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CCG.Atom.NP")).group prec✝
- CCG.instReprAtom.repr CCG.Atom.N prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CCG.Atom.N")).group prec✝
- CCG.instReprAtom.repr CCG.Atom.PP prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CCG.Atom.PP")).group prec✝
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CCG.instReprCat = { reprPrec := CCG.instReprCat.repr }
Equations
- One or more equations did not get rendered due to their size.
- CCG.instDecidableEqCat.decEq (CCG.Cat.atom a) (CCG.Cat.atom b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- CCG.instDecidableEqCat.decEq (CCG.Cat.atom a) (a_1.rslash a_2) = isFalse ⋯
- CCG.instDecidableEqCat.decEq (CCG.Cat.atom a) (a_1.lslash a_2) = isFalse ⋯
- CCG.instDecidableEqCat.decEq (a.rslash a_1) (CCG.Cat.atom a_2) = isFalse ⋯
- CCG.instDecidableEqCat.decEq (a.rslash a_1) (a_2.lslash a_3) = isFalse ⋯
- CCG.instDecidableEqCat.decEq (a.lslash a_1) (CCG.Cat.atom a_2) = isFalse ⋯
- CCG.instDecidableEqCat.decEq (a.lslash a_1) (a_2.rslash a_3) = isFalse ⋯
Instances For
Equations
- CCG.«term_/_» = Lean.ParserDescr.trailingNode `CCG.«term_/_» 60 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "/") (Lean.ParserDescr.cat `term 0))
Instances For
Equations
- CCG.«term_\_» = Lean.ParserDescr.trailingNode `CCG.«term_\_» 60 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "\\") (Lean.ParserDescr.cat `term 0))
Instances For
Try to combine two categories using all available rules.
Equations
- CCG.combine x✝¹ x✝ = (CCG.forwardApp x✝¹ x✝ <|> CCG.backwardApp x✝¹ x✝ <|> CCG.forwardComp x✝¹ x✝ <|> CCG.backwardComp x✝¹ x✝)
Instances For
Forward type-raising: X => T/(T\X).
Equations
- CCG.forwardTypeRaise x t = t.rslash (t.lslash x)
Instances For
Backward type-raising: X => T(T/X).
Equations
- CCG.backwardTypeRaise x t = t.lslash (t.rslash x)
Instances For
Equations
- CCG.instReprLexEntry = { reprPrec := CCG.instReprLexEntry.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A derivation step.
- lex : LexEntry → DerivStep
- fapp : DerivStep → DerivStep → DerivStep
- bapp : DerivStep → DerivStep → DerivStep
- fcomp : DerivStep → DerivStep → DerivStep
- bcomp : DerivStep → DerivStep → DerivStep
- ftr : DerivStep → Cat → DerivStep
- btr : DerivStep → Cat → DerivStep
- coord : DerivStep → DerivStep → DerivStep
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CCG.instReprDerivStep = { reprPrec := CCG.instReprDerivStep.repr }
Get the category of a derivation.
Equations
- (CCG.DerivStep.lex a).cat = some a.cat
- (a.fapp a_1).cat = do let c1 ← a.cat let c2 ← a_1.cat CCG.forwardApp c1 c2
- (a.bapp a_1).cat = do let c1 ← a.cat let c2 ← a_1.cat CCG.backwardApp c1 c2
- (a.fcomp a_1).cat = do let c1 ← a.cat let c2 ← a_1.cat CCG.forwardComp c1 c2
- (a.bcomp a_1).cat = do let c1 ← a.cat let c2 ← a_1.cat CCG.backwardComp c1 c2
- (a.ftr a_1).cat = do let x ← a.cat some (CCG.forwardTypeRaise x a_1)
- (a.btr a_1).cat = do let x ← a.cat some (CCG.backwardTypeRaise x a_1)
- (a.coord a_1).cat = do let c1 ← a.cat let c2 ← a_1.cat CCG.coordinate c1 c2
Instances For
Equations
- CCG.john_sleeps = (CCG.DerivStep.lex { form := "John", cat := CCG.NP }).bapp (CCG.DerivStep.lex { form := "sleeps", cat := CCG.IV })
Instances For
Equations
- CCG.sees_mary = (CCG.DerivStep.lex { form := "sees", cat := CCG.TV }).fapp (CCG.DerivStep.lex { form := "Mary", cat := CCG.NP })
Instances For
Equations
- CCG.john_sees_mary = (CCG.DerivStep.lex { form := "John", cat := CCG.NP }).bapp CCG.sees_mary
Instances For
Equations
- CCG.the_cat = (CCG.DerivStep.lex { form := "the", cat := CCG.Det }).fapp (CCG.DerivStep.lex { form := "cat", cat := CCG.N })
Instances For
Equations
- CCG.the_cat_sleeps = CCG.the_cat.bapp (CCG.DerivStep.lex { form := "sleeps", cat := CCG.IV })
Instances For
Equations
- CCG.big_cat = (CCG.DerivStep.lex { form := "big", cat := CCG.AdjAttr }).fapp (CCG.DerivStep.lex { form := "cat", cat := CCG.N })
Instances For
Equations
- CCG.the_big_cat = (CCG.DerivStep.lex { form := "the", cat := CCG.Det }).fapp CCG.big_cat
Instances For
Equations
- CCG.the_big_cat_sleeps = CCG.the_big_cat.bapp (CCG.DerivStep.lex { form := "sleeps", cat := CCG.IV })
Instances For
Check if a derivation yields category S.
Instances For
Count combinatory operations in a derivation.
Equations
- (CCG.DerivStep.lex a).opCount = 0
- (a.fapp a_1).opCount = 1 + a.opCount + a_1.opCount
- (a.bapp a_1).opCount = 1 + a.opCount + a_1.opCount
- (a.fcomp a_1).opCount = 2 + a.opCount + a_1.opCount
- (a.bcomp a_1).opCount = 2 + a.opCount + a_1.opCount
- (a.ftr a_1).opCount = 1 + a.opCount
- (a.btr a_1).opCount = 1 + a.opCount
- (a.coord a_1).opCount = 1 + a.opCount + a_1.opCount
Instances For
Depth of derivation tree.
Equations
- (CCG.DerivStep.lex a).depth = 1
- (a.fapp a_1).depth = 1 + max a.depth a_1.depth
- (a.bapp a_1).depth = 1 + max a.depth a_1.depth
- (a.fcomp a_1).depth = 1 + max a.depth a_1.depth
- (a.bcomp a_1).depth = 1 + max a.depth a_1.depth
- (a.ftr a_1).depth = 1 + a.depth
- (a.btr a_1).depth = 1 + a.depth
- (a.coord a_1).depth = 1 + max a.depth a_1.depth
Instances For
Equations
- CCG.john_tr = (CCG.DerivStep.lex { form := "John", cat := CCG.NP }).ftr CCG.S
Instances For
Equations
- CCG.john_likes = CCG.john_tr.fcomp (CCG.DerivStep.lex { form := "likes", cat := CCG.TV })
Instances For
Equations
- CCG.mary_tr = (CCG.DerivStep.lex { form := "Mary", cat := CCG.NP }).ftr CCG.S
Instances For
Equations
- CCG.mary_hates = CCG.mary_tr.fcomp (CCG.DerivStep.lex { form := "hates", cat := CCG.TV })
Instances For
Instances For
Equations
- CCG.john_likes_and_mary_hates_beans = CCG.john_likes_and_mary_hates.fapp (CCG.DerivStep.lex { form := "beans", cat := CCG.NP })