Skip to main content
0 votes
1 answer
62 views

When I am testing the examples in Theorem Proving in Lean4 , I find out that command #check Implies threw an error : unknown identifier Implies. I tried #print And and find out that it is a struct : ...
Chen_zy's user avatar
1 vote
0 answers
97 views

I'm trying to construct a typed lambda calculus, something along the lines of: struct Fun<T>(T); // actual definition elided for simplicity struct TypeErasedExpr { /* elided for simplicity */ } ...
terepy's user avatar
  • 89
1 vote
1 answer
75 views

I would like to define a DSL for writing lambda terms in Lean using macros a la the arithmetic example. I want to support syntax for multiple arguments in the lambda, and left-associativity. Thus far, ...
Joris KBos's user avatar
1 vote
1 answer
186 views

In Will Kurt's book on Haskell, there is an example on how to overwrite a variable x in Haskell using lambda abstraction (not to be tried at home!). Here is the example: (\x -> (\x -> (\x -> ...
ezyman's user avatar
  • 441
0 votes
1 answer
113 views

I have to solve this exercise: Formulate and prove a confluence theorem for lambda calculus (ie, prove that if a λ-expression e reduces to both e1 and e2, then there exists e' such that e1 and e2 ...
Vlad's user avatar
  • 3
0 votes
1 answer
108 views

I'm writing interpreter for simple lambda calculus based language in C. EBNF for language is S ::= E E ::= 'fn' var '->' E | T {'+' T} | T {'-' T} T ::= F {'*' F} | F {'/' F} F ::= P {P} P ::= var |...
Dendrit's user avatar
1 vote
1 answer
80 views

I am trying to define a Lambda-Calculus representation of the word 'are', which is an equality predicate for this ccg: ccg = ''' # CCG grammar # complete the lexical entries with their categories and ...
Julius's user avatar
  • 49
1 vote
0 answers
29 views

I known this could be more of a mathematical question. All the answers I've found talks about something like "control flow" but I don't think that is mathematically well-defined.
Jacder Zhang's user avatar
2 votes
2 answers
124 views

The following toy data has 5 variables, X1 to X5. set.seed(123) df <- data.frame(matrix(rnorm(500), 100, 5)) I want to perform specific operations on specific variables, using a named list of ...
user18894435's user avatar
0 votes
1 answer
85 views

No idea if anyone on this site happens to know about $vau calculi, but anyway, for some reason, this snippet leads to an infinite loop, and I'm not sure if it's due to the $vau implementation I use, ...
Olle Härstedt's user avatar
2 votes
0 answers
46 views

data ChurchN a = ChurchN { numeral :: (a -> a) -> a -> a , litRep :: String } next :: ChurchN a -> ChurchN a next x = ChurchN { numeral = \f y -> f (numeral x f ...
Raykiru Shiroyshi's user avatar
0 votes
1 answer
151 views

I'm working on a lambda calculus interpreter in Haskell, and I need help implementing semantic rules for sum types. Below is a simplified version of my code with lexer, interpreter, and typechecker ...
Narcisismo's user avatar
-2 votes
1 answer
229 views

Given a list of sequential, variable-length (rx1) arrays, dynamically stack the arrays (vertically) such that they follow a particular set of rules -- ordered first by the Order column in the States ...
Prodigus's user avatar
0 votes
0 answers
29 views

I'm currently working on code for an equation dictating the values of "null" and "void, using these motives as baseline material the code is to quantify ley lines of isotopes, ...
Ryan Donnelly's user avatar
4 votes
1 answer
138 views

I'm currently learning about Church encoding and I'm trying to implement the mul (multiply) function. This is the correct implementation mul cn cm = \f x -> cn (cm f) x This (my implementation) ...
richie willynton's user avatar

15 30 50 per page
1
2 3 4 5
44