Are the statements "If P is true then x exists" and "there exists x such that P is true" equivalent?

Consider these two statements:

1: P is true $implies$ $exists x$

2: $exists x$ such that P is true

Are they equivalent? If so, can the phrase "such that" be substituted by $impliedby$?

datatypes – What is the SQL Server equivalent of pg_typeof(), how can I get the type of a column returned in a result set?

Using PostgreSQL, I can use pg_typeof(exp) like

SELECT pg_typeof( cast(1 AS int) );
SELECT pg_typeof(x), x FROM foo;

And get back the result (integer in the case of the first example). Is there a SQL Server equivalent? How can I find the result given a field in a result set?

FROM foo;

I want to know what type x is?

postgresql – Equivalent of utf8_general_ci in Postgres/ICU?

In MySQL there is a collation utf8_general_ci which provides case-insensitive comparisons in a variety of languages. For example, these are all 1 (true):

SELECT 'ı' = 'I' SOLLATE 'utf8_general_ci';
SELECT 'i' = 'I' COLLATE 'utf8_general_ci';
SELECT 'ä' = 'Ä' COLLATE 'utf8_general_ci';

Can I define a similar collation using PostgreSQL’s ICU?

I tried

CREATE COLLATION "undefined_ci_nondet_old" (
  PROVIDER = 'icu',
  LOCALE = "@colStrength=secondary",

But that doesn’t seem to include the Turkish I/ı conversion:

SELECT 'ı' = 'I' COLLATE undefined_ci_nondet_old; -- false

turing machines – Are decidable set/languages EQUIVALENT to type 1 grammars (non-contracting)?

Suppose a Turing Machine (TM_G) that generates natural numbers following < or, equivalently, it generates words in lexicographical order.

Then, that language/set is decidable. Because it is trivial to devise a (halting) TM_R, using TM_G, that recognize/accepts the words/numbers of that language/set.

It is also clear (really?), that there must be a non-contracting grammar for the language of TM_G.

Now, let’s suppose a we have a TM_G’ that generates a decidable language not in lexicographical order. Because the language is decidable, there must exist a TM_R’ that completely recognizes it. Now, it is not clear how to build TM_R’ using TM_G’ (probably this is a unsolvable problem (is it?). At least, it is easy how to have a semi-deciding TM_R’ based on TM_G’).

In any case, by assumption, TM_R’ (the halting/complete recognizer) does exist. Then, we can use TM_R’ to build a TM_G” which generates the language in lexicographical order. Hence (really?), there exists a non-contracting grammar for the language.

In sum, is the class of decidable languages equivalent to non-contracting grammars?

In other words, are there a decidable language that cannot be generated by a non-contracting grammar (type 1)?

Expressed in terms of Turing Machines: **is the power of all halting TM equivalent to the power of all linear bounded automata (a restricted type of TM equivalent to type-1 grammars).? **

big sur – MacOS equivalent for Ubuntu Linker (ld) command?

I’m following some tutorials from 2015, and in it you run this Linker command:

ld -T linker.ld -melf_i386 loader.o -o kernel.elf

I get this error:

ld: unknown option: -T

I tried to replace it with ld --script=linker.ld -melf_i386 loader.o -o kernel.elf, but this error: ld: unknown option: --script=linker.ld

After now looking through man ld, it seems neither of these are options. This tutorial was designed for Ubuntu, what would be the MacOS equivalent?

If it matters, I am on an Intel Big Sur machine.

Convert the Finite Automata (FSA) into its equivalent regular expression, using stepwise minimization

I was doing an assignment of Theory of automata but while doing this question I am stuck there is no such state that can be eliminated even from transition table. I am very confused and stuck please help me out

enter image description here

complexity theory – Given an algorithms, is it possible to find all other equivalent algorithms for the same computable function in the same model

For any computable-function, there may be multiple different algorithms (possibly countably infinite). For example, sort has many different implementations/algorithms, that we know of or that we have found so far. They all produce the same output for the same input.

Given any specific computable-function or even a specific instance of an algorithm/implementation (for any model of computation, functional in lambda calculus, imperative in turing machines, or any other) for it, is it possible to enumerate/find all other equivalent algorithms/implementations for that same computable-function, for the same model.

ie. If I have an algorithm or even a specification for sort, it is possible to find the other algorithms for sort?

How to prove that predicates are not equivalent?

Given following predicates:

F_1 = (forall x)(F(x) leftrightarrow G(x)) text{ and } F_2 = (forall x)F(x) leftrightarrow (forall x)G(x)

I think that they are not equivalent, but if it possible to prove that?

at.algebraic topology – Spaces homotopy equivalent over the topologist’s sine curve

Consider $$T=left{ left( x, sin tfrac{1}{x} right ) : x in (0,1) right} cup {(0,0)}subset mathbb{R}^2$$
with its subspace topology.

Denote $p_0=(0, 0)in T, p_1=(1, sin 1)in T$.

A TSC-homotopy between continuous maps $f, g:Xto Y$ is a continuous map $H:Xtimes Tto Y$ such that $H(x, p_0)=f, H(x, p_1)=g$.

What can be said about pairs of spaces $X, Y$ such that there exist continuous maps $f:Xto Y, g:Yto X$ and TSC-homotopies $fcirc gsim mathrm{id}_Y, gcirc fsimmathrm{id}_X$?

Proving that a language defined by a regular expression is equivalent to a right linear grammar

After thinking for a bit, I am not able to prove a double inclusion proof for the following problem. It seems very interesting to me.

Consider the regular expression $r= ((1(00)^∗1 + 0)1)^∗$ and the right-linear grammar $G= ({S,A},{0,1},S,P)$, where $P$ consists of the following rules:

$Srightarrow 1A|01S|lambda$

$Arightarrow 00A|11S$

Prove that $L(G)subseteq L(r)$ and vice versa.