Is there a term for these “descendancy” subgraphs of directed acyclic graphs?

Consider a directed acyclic graph $ G$ with vertex set $ V$ . Choose a vertex $ v$ , and let $ H$ be the subgraph containing $ v$ and all other vertices in $ G$ that are reachable from $ v$ (along with the associated directed edges).

(In other words, if we choose $ v \in V$ , then we are interested in the subset consisting of $ v$ and all of its descendants).

Is there an accepted term for this particular subset of vertices (or the subgraph)? It seems to be a fairly elementary concept so I expected to find a commonly used phrase for this, but my search is coming up empty so far. Thanks for any answers or leads!

How to find a lambda term to complete a function?

I tried to complete this exercise but i stopped… Defining a $ \lambda $ -term M such that: $ $ (<M,u>)<M,v> \: \simeq_{\beta} \: <M,u>$ $

I chose $ M=\lambda m \lambda a \lambda b \lambda p \,((p)m)b \:$ then i have to find a representation T of a function using M that value true if the sequence is empty and false if it’s not. A sequence is defined as: $ $ []=\lambda x_0\lambda x_1 \lambda z z \ [b]=\lambda x_0 \lambda x_1 \lambda z (z) x_b\ [b_1 b_2]=\lambda x_0 \lambda x_1 \lambda z ((z)x_{b_1})x_{b_2} \ .\. \ . \ [b_1 .. b_n]= \lambda x_0 \lambda x_1 \lambda z (…((z) x_{b_1})x_{b_2}…)x_{b_n} $ $ so the sequence of exercise is : $ $ [01101]= \lambda x_0 \lambda x_1 \lambda z (((((z)x_0)x_1)x_1)x_0)x_1 $ $ For example T need to be: $ (T)[01101] \simeq_{\beta}$ false while $ (T) []\simeq_{\beta}$ true. I really find that difficult. How i can do that?

Proving a first order logic theorem with equational logic with a term rewriting system

I am trying to translate and prove a theorem, originally written in first order logic (FOL), into a combination of equational logic (EL) and Boolean logic (BL) (more precisely a model of Boolean Algebra). The target language also permits Skolemization (Sk). So the translation task is from FOL to EL+BL+Sk. My motivation is that if my translation and subsequent proof in EL+BL+Sk are correct, then I should be able to perform such proofs using a Term Rewriting System (TRS). TRS can be used to prove equational theories. Because EL+BL is a sub-logic of FOL and Skolemization results in an equisatisfiable system, it is hoped that a valid proof in EL+BL+Sk is a valid proof of the original FOL theorem. Below is a FOL example and my attempt at a proof using natural deduction. This is followed by my attempt at translation and proof in EL+BL+Sk. See notes on translation/proof below.

My questions are:

Is the tentative translation from FOL to EL+BL+Sk correct?

Is the tentative proof in EL+BL+Sk correct?

Does the proof in EL+BL+Sk count as a proof of the original FOL theorem? I am not sure how proof theoretic entailment ($ \vdash$ ) in FOL relates to semantic entailment ($ \models$ ) in EL+BL+Sk. Does ($ \Gamma \models_{EL+BL+Sk} \varphi \iff \Gamma \vdash_{FOL} \varphi$ ) hold?

Example FOL formulae

At least one person is liked by every person: $ \exists y \forall x :Likes(x,y)$

Every persons likes at least one person: $ (\forall x \exists y: Likes(x,y)) $

I want to prove: $ (\exists y \forall x: Likes(x,y)) \vdash (\forall x \exists y : Likes(x,y)) $

Natural Deduction (ND) proof

enter image description here

The ND proof uses syntactic consequence where $ \Gamma \vdash \varphi$ means that the sentence $ \varphi$ is provable from the set of assumptions $ \Gamma$ . \begin{align*} &\textbf{FOL Theorem}~~(\exists y \forall x :Likes(x,y)) \vdash (\forall x \exists y :Likes(x,y)) \ &\ &\textbf{Notation for EL+BL+Sk}\ &x~~~~~~~~~~~~~~~~~~~~~~~~~\forall x~~\text{Universally Quantified variable}\ &c~~~~~~~~~~~~~~~~~~~~~~~~~~\text{Skolem Constant}\ &d~~~~~~~~~~~~~~~~~~~~~~~~\text{Arbitrary $ Person$ , for universal elimination}\ &\mathtt{skFun}~~~~~~~~~~~~~~~~\text{Skolem Function}\ &\mathtt{Likes}~~~~~~~~~~~~~~~~\text{Boolean valued function}\ &\mathtt{true}~~~~~~~~~~~~~~~~~~\text{Boolean constant}\ &\ &\textbf{Translation of Theorem to EL+BL+Sk:}\ &(\forall x :(\mathtt{skFun}(x)=c ,\mathtt{Likes}(x,c)))\models(\forall x:\mathtt{Likes}(x,\mathtt{skFun}(x))) \ &\ &\textbf{Proof in EL+BL+Sk}\ &\textbf{1}~~\forall x:\mathtt{Likes}(x,c) = true~~~~~~\text{Assumption, with Skolem constant $ c$ }\ &\textbf{2}~~\forall x:\mathtt{skFun}(x) = c~~~~~~~~~~~~~~~\text{Interpretation of Sk. function with Sk. constant $ c$ }\ &\textbf{3}~~\mathtt{Likes}(d,\mathtt{skFun}(d))~~~~~~~~~~~~\text{Universal elim & Skolemization of term to be proved}\ &\textbf{4}=~~~~~\mathtt{Likes(d,c)}~~~~~~~~~~~~~~~~\text{Apply 2 to second argument of 3}\ &\textbf{5}=~~~~~~true~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\text{Apply 1 at 4}\ \end{align*} Notes on translation/proof.

  • The EL+BL+Sk proof relies on an interpretation, so the translation needs semantic entailment $ \models$ . In general, this can be written as $ \Gamma \models_{EL+BL+Sk} \varphi$ , which means that under $ EL+BL+Sk$ logic the sentence $ \varphi$ is true in all models of $ \Gamma$ .

  • In EL all variables are considered to be universally quantified.

  • Existential variables in FOL that are not in the scope of universals are translated to Skolem constants.

  • Existential variables in FOL that are in the scope of universals are translated to Skolem functions e.g. $ \mathtt{skFun}(x)$ with single universal argument of $ x$ . The original existential was in the scope $ x$ .

  • Each predicate in FOL is translated to a Boolean valued operation in EL+BL+Sk, e.g. predicate $ Likes$ becomes Boolean operation $ \mathtt{Likes}$ .

  • In EL terms are distinct, unless they are made identical or equal by equations.

Here is the listing in CafeOBJ using TRS.

mod LIKES {   [Person]   pred Likes : Person Person         }  op c : -> Person . ops d : -> Person . op skFun : Person -> Person . -- Hypothesis  eq [assumption] : Likes(x:Person,c) = true . eq [skolem] :  skFun(x:Person) =  c . reduce Likes(d,skFun(d)) . --> Gives true 

Is there a term for the psychological issue of “code loss” for programmers?

(Note: I wanted to post this to the “Psychology” category, but it had no matching tags at all.)

I am a programmer. I have just deleted a huge amount of code which I painstakingly researched, thought about, coded, then improved and fixed as bugs popped up for a long time.

All of that code, which took me a ridiculous amount of time, effort and general “mind work”, has now been replaced by a very small number of lines which basically leverage PHP’s built-in “ICU” features to properly output numbers, money sums and date/time in the correct manner for every combination of language, locale, currency and timezone imaginable.

Previously, I did not know that this already existed, so I basically replicated a lot of it myself, and I now realize how far from perfect it was. But still, I did it, and that code had in my mind “hardened” or “settled” as “gold code” which I never thought I would touch again…

Basically, I mourn my now useless, superseded, obsolete code chunks. I’m annoyed by myself for doing all that unnecessary work and it took a lot of mental wrestling to finally convince myself to go through with it.

Is this common among programmers, and does it have an established term? Such as “code loss” or “code mourning”?

Basically, even though I have really improved my application/library/framework to an extreme degree, it still feels like I’ve “lost all that work” because the numbers of lines are slashed so much in one go. It’s not a nice feeling.

How to compute the general term formula for the number of full binary tree heaps that can be formed with distinct elements?

The number of possible heaps that are full binary trees of height $ h$ and can be formed with ($ n = 2^h – 1$ ) distinct elements can be computed by recursion: $ $ a_h = {2^h – 2 \choose 2^{h – 1} – 1} a_{h – 1}^2 $ $ How to compute the general term formula with this recursion formula?

Get categories within specific term

I have a WooCommerce shop, where I’d like to show every possible product category, where the products have a specific attribute (term). Say I have a product attribute called: “Designer”, then I wish to find all the categories where products have attribute Designer => “Nike”.

So essentially the output would be:

Nike categories:

  • Shoes
  • Hats
  • Pants

Any pointers in the right direction where I can solve this?

Is the permutation lemma needed for term substitution?

In TAPL book, page 453, Pierce discusses the following lemma:

$ \Gamma , x:S , \Delta \vdash t:T \land \Gamma \vdash:S \implies [x \mapsto s]t:T$

He claims that when $ t$ is a variable, we need to use the permutation lemma:

$ \Gamma \vdash t:T \implies \Delta \vdash t:T$ where $ \Delta$ is a permutation of an extension of $ \Gamma$ .

I don’t think this should be the case since in this context the T-VAR rule says:

$ x:T \in \Gamma \implies \Gamma \vdash x:T$

So if I do the proof I end up with the following goals:

$ y \neq x \implies \Gamma,x:S,\Delta \vdash y:T \implies \Gamma,\Delta \vdash y:T$

$ y = x \implies \Gamma,x:S,\Delta \vdash x:T \implies \Gamma, s:S \implies \Gamma,\Delta \vdash s:T$

Should this two not be obvious and not use any kind of permutation lemma?

What is the etymology of the term ‘Gish’?

I understand that it roughly means a fighter/mage, as per this question: How to optimize a Gishy [Fighter/Mage] Character?

But I just wanted to know more about how the term came about. It’s so hard to keep up with the kids these days, learning the lingo helps.

Is it related to Githzerai in DnD? A good answer would include the root words, and a few examples from RPG forums with context (if they exist; I could only find this).

What is meant by the term “concatenation of two q’s denotes a break between two edges in Turing Machine T”? [Universal Turing Machine Encoding Scheme]

I’m studying the topic of universal turing machine encoding and the first line says we can write the turing machine encoding in the form of syllables like


where q’s are representing states and c’s are characters

M denotes either left or right move

I’ve understood what these lines mean but what does qxqz mean? or what does qxqx mean? I’m quite confused there’s no read/write or tapehead movement what does this all stand for?